From c7a23ef4fad7fda5c0be670565c220063eb8a813 Mon Sep 17 00:00:00 2001 From: Soruk Date: Fri, 3 Feb 2023 13:58:46 +0100 Subject: [PATCH 01/15] Remove argument --- .github/workflows/template-web.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index 69e64ba..e1eac50 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -70,7 +70,8 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} + az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} + # az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} - name: Download web artifacts uses: actions/download-artifact@v3 From 11d854425d574293d7689ee9134f96b19ce94944 Mon Sep 17 00:00:00 2001 From: Soruk Date: Fri, 3 Feb 2023 14:05:32 +0100 Subject: [PATCH 02/15] Add hash to deployment name --- .github/workflows/template-web.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index e1eac50..52d49e1 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -70,7 +70,7 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} + az deployment group create -n ghaction${{ github.sha }} -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} # az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} - name: Download web artifacts From d39c0d50963bfec28bebcc05a6b07a45040a6298 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 21:07:15 +0100 Subject: [PATCH 03/15] test using double quote --- .github/workflows/template-api.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/template-api.yml b/.github/workflows/template-api.yml index 711e7c4..977d7f4 100644 --- a/.github/workflows/template-api.yml +++ b/.github/workflows/template-api.yml @@ -51,10 +51,23 @@ jobs: azPSVersion: "3.1.0" failOnStandardError: true inlineScript: | - az deployment group create -n ghaction${{ github.sha }} ` - --resource-group ${{secrets.AZURE_RESOURCE_GROUP_NAME}} ` + $deploymentName = "ghaction${{ github.sha }}" + $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" + $acrName = "${{ secrets.ACR_NAME }}" + $imageTag = "${{ github.sha }}" + $administratorLogin = "${{ secrets.PODCASTDB_USER_LOGIN }}" + $administratorLoginPsasword = "${{secrets.PODCASTDB_USER_PASSWORD }}" + $storageAccountName = "${{ secrets.STORAGE_NAME }}" + $serverName= "${{ secrets.PODCASTDB_SERVER_NAME }}" + $kubernetesEnvName = "${{ secrets.KUBERNETES_ENV_NAME }}" + $workspaceName = "${{ secrets.WORKSPACE_NAME }}" + $apiName = "${{ secrets.API_RESOURCE_NAME }}" + $updaterName = "${{ secrets.UPDATER_RESOURCE_NAME }}" + + az deployment group create -n "$($deploymentName)" ` + --resource-group "$($resourceGroupName)" ` --template-file deploy/Services/api.bicep ` - --parameters acrName=${{ secrets.ACR_NAME }} imageTag=${{ github.sha }} administratorLogin=${{secrets.PODCASTDB_USER_LOGIN}} administratorLoginPassword=${{secrets.PODCASTDB_USER_PASSWORD}} storageAccountName=${{ secrets.STORAGE_NAME }} serverName=${{secrets.PODCASTDB_SERVER_NAME}} kubernetesEnvName=${{secrets.KUBERNETES_ENV_NAME}} workspaceName=${{secrets.WORKSPACE_NAME}} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} + --parameters acrName="$($acrName)" imageTag="$($imageTag)" administratorLogin="$($administratorLogin)" administratorLoginPassword="$($administratorLoginPassword)" storageAccountName="$($storageAccountName)" serverName="$($serverName)" kubernetesEnvName="$($administratorkubernetesEnvNameLogin)" workspaceName="$($workspaceName)" apiName="$($apiName)" updaterName="$($updaterName)" if( $LASTEXITCODE -ne 0 ) { exit -1 } - name: Upload Images From 644be8178ca4eb0323ed80853bd92556cf3cd0b9 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 21:16:43 +0100 Subject: [PATCH 04/15] Using PS variables --- .github/workflows/template-hub.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template-hub.yml b/.github/workflows/template-hub.yml index 8e48ab0..b9d5159 100644 --- a/.github/workflows/template-hub.yml +++ b/.github/workflows/template-hub.yml @@ -23,7 +23,20 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - az deployment group create -n ghactionlistentogether${{ github.sha }} -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Services/hub.bicep --parameters webAppName=${{secrets.HUB_WEBAPP_NAME}} servicePlanName=${{secrets.SERVICE_PLAN_NAME}} storageAccountName=${{secrets.STORAGE_NAME}} administratorLogin=${{secrets.PODCASTDB_USER_LOGIN}} administratorLoginPassword=${{secrets.PODCASTDB_USER_PASSWORD}} serverName=${{secrets.PODCASTDB_SERVER_NAME}} apiName=${{secrets.API_RESOURCE_NAME}} + $deploymentName = "ghactionlistentogether${{ github.sha }}" + $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" + $webAppName = "${{ secrets.HUB_WEBAPP_NAME}}" + $servicePlanName = "${{ secrets.SERVICE_PLAN_NAME }}" + $storageAccountName = "${{ secrets.STORAGE_NAME }}" + $administratorLogin = "${{ secrets.PODCASTDB_USER_LOGIN }}" + $administratorLoginPassword = "${{ secrets.PODCASTDB_USER_PASSWORD }}" + $serverName = "${{ secrets.PODCASTDB_SERVER_NAME }}" + $apiName = "${{ secrets.API_RESOURCE_NAME }}"" + + az deployment group create -n "$($deploymentName)" ` + --resource-group "$($resourceGroupName)" ` + --template-file deploy/Services/hub.bicep ` + --parameters webAppName="$($webAppName)" servicePlanName="$($servicePlanName)" storageAccountName="$($storageAccountName)" administratorLogin="$($administratorLogin)" administratorLoginPassword="$($administratorLoginPassword)" serverName="$($serverName)" apiName="$($apiName)" - uses: actions/download-artifact@v3 with: From ef052aeaab167433f30a509eead39ed3bda4fab4 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 21:20:24 +0100 Subject: [PATCH 05/15] Us PS variables --- .github/workflows/template-web.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index 52d49e1..72ceb4b 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -70,7 +70,19 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - az deployment group create -n ghaction${{ github.sha }} -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} + $deploymentName = "ghaction${{ github.sha }}" + $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" + $webAppName = "${{ secrets.WEBAPP_NAME }}" + $servicePlanName = "${{ secrets.SERVICE_PLAN_NAME }}" + $servicePlanSku = "${{ secrets.SERVICE_PLAN_SKU }}" + $hubWebAppName = "${{ secrets.HUB_WEBAPP_NAME }}" + $apiName = "${{secrets.API_RESOURCE_NAME}}"" + + az deployment group create -n "$($deploymentName)" ` + --resource-group "$($resourceGroupName)" ` + --template-file deploy/Services/web.bicep ` + --parameters webAppName="$($webAppName)" servicePlanName="$($servicePlanName)" servicePlanSku="$($servicePlanSku)" hubWebAppName="$($hubWebAppName)" apiName="$($apiName)" + # az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} - name: Download web artifacts From a51f3e77a2a074258f5684622290aed7553a542b Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:13:29 +0100 Subject: [PATCH 06/15] some changes --- .github/workflows/template-api.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template-api.yml b/.github/workflows/template-api.yml index 977d7f4..8d2939b 100644 --- a/.github/workflows/template-api.yml +++ b/.github/workflows/template-api.yml @@ -23,8 +23,15 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - az deployment group create -n ghactionbgtasks${{ github.sha }} -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Services/acr.bicep --parameters acrName=${{secrets.ACR_NAME}} - + $deploymentName = "ghactionbgtasks${{ github.sha }}" + $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" + $acrName = "${{ secrets.ACR_NAME }}" + + az deployment group create -n "$($deploymentName)" ` + --resource-group "$($resourceGroupName)" ` + --template-file deploy/Services/acr.bicep ` + --parameters acrName="$($acrName)" + - name: Login to ACR uses: docker/login-action@v1 with: From 1dee538f843d09c96d2bfaf2ad484c8b7fb47f60 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:18:44 +0100 Subject: [PATCH 07/15] fix password variable --- .github/workflows/template-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template-api.yml b/.github/workflows/template-api.yml index 8d2939b..4ba1089 100644 --- a/.github/workflows/template-api.yml +++ b/.github/workflows/template-api.yml @@ -31,7 +31,7 @@ jobs: --resource-group "$($resourceGroupName)" ` --template-file deploy/Services/acr.bicep ` --parameters acrName="$($acrName)" - + - name: Login to ACR uses: docker/login-action@v1 with: @@ -63,7 +63,7 @@ jobs: $acrName = "${{ secrets.ACR_NAME }}" $imageTag = "${{ github.sha }}" $administratorLogin = "${{ secrets.PODCASTDB_USER_LOGIN }}" - $administratorLoginPsasword = "${{secrets.PODCASTDB_USER_PASSWORD }}" + $administratorLoginPassword = "${{ secrets.PODCASTDB_USER_PASSWORD }}" $storageAccountName = "${{ secrets.STORAGE_NAME }}" $serverName= "${{ secrets.PODCASTDB_SERVER_NAME }}" $kubernetesEnvName = "${{ secrets.KUBERNETES_ENV_NAME }}" From bec70960ab0210d52d19bd5d713201bdbaf453e5 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:25:19 +0100 Subject: [PATCH 08/15] fix path --- .github/workflows/template-web.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index 72ceb4b..6c034f5 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -80,7 +80,7 @@ jobs: az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` - --template-file deploy/Services/web.bicep ` + --template-file deploy/Web/web.bicep ` --parameters webAppName="$($webAppName)" servicePlanName="$($servicePlanName)" servicePlanSku="$($servicePlanSku)" hubWebAppName="$($hubWebAppName)" apiName="$($apiName)" # az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} From 808ec76b268e624f58e5d53ba450fdcaa649d1bc Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:27:02 +0100 Subject: [PATCH 09/15] fix argument --- .github/workflows/template-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-api.yml b/.github/workflows/template-api.yml index 4ba1089..7eae017 100644 --- a/.github/workflows/template-api.yml +++ b/.github/workflows/template-api.yml @@ -74,7 +74,7 @@ jobs: az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` --template-file deploy/Services/api.bicep ` - --parameters acrName="$($acrName)" imageTag="$($imageTag)" administratorLogin="$($administratorLogin)" administratorLoginPassword="$($administratorLoginPassword)" storageAccountName="$($storageAccountName)" serverName="$($serverName)" kubernetesEnvName="$($administratorkubernetesEnvNameLogin)" workspaceName="$($workspaceName)" apiName="$($apiName)" updaterName="$($updaterName)" + --parameters acrName="$($acrName)" imageTag="$($imageTag)" administratorLogin="$($administratorLogin)" administratorLoginPassword="$($administratorLoginPassword)" storageAccountName="$($storageAccountName)" serverName="$($serverName)" kubernetesEnvName="$($kubernetesEnvName)" workspaceName="$($workspaceName)" apiName="$($apiName)" updaterName="$($updaterName)" if( $LASTEXITCODE -ne 0 ) { exit -1 } - name: Upload Images From e2af34d11a45e6cf0321603ab49df047a7bbc449 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:31:56 +0100 Subject: [PATCH 10/15] using simple quote --- .github/workflows/template-api.yml | 30 +++++++++++++++--------------- .github/workflows/template-hub.yml | 18 +++++++++--------- .github/workflows/template-web.yml | 12 ++++++------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/template-api.yml b/.github/workflows/template-api.yml index 7eae017..641837b 100644 --- a/.github/workflows/template-api.yml +++ b/.github/workflows/template-api.yml @@ -23,9 +23,9 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - $deploymentName = "ghactionbgtasks${{ github.sha }}" - $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" - $acrName = "${{ secrets.ACR_NAME }}" + $deploymentName = "ghactionbgtasks${{ github.sha }}' + $resourceGroupName = '${{ secrets.AZURE_RESOURCE_GROUP_NAME }}' + $acrName = '${{ secrets.ACR_NAME }}' az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` @@ -58,18 +58,18 @@ jobs: azPSVersion: "3.1.0" failOnStandardError: true inlineScript: | - $deploymentName = "ghaction${{ github.sha }}" - $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" - $acrName = "${{ secrets.ACR_NAME }}" - $imageTag = "${{ github.sha }}" - $administratorLogin = "${{ secrets.PODCASTDB_USER_LOGIN }}" - $administratorLoginPassword = "${{ secrets.PODCASTDB_USER_PASSWORD }}" - $storageAccountName = "${{ secrets.STORAGE_NAME }}" - $serverName= "${{ secrets.PODCASTDB_SERVER_NAME }}" - $kubernetesEnvName = "${{ secrets.KUBERNETES_ENV_NAME }}" - $workspaceName = "${{ secrets.WORKSPACE_NAME }}" - $apiName = "${{ secrets.API_RESOURCE_NAME }}" - $updaterName = "${{ secrets.UPDATER_RESOURCE_NAME }}" + $deploymentName = 'ghaction${{ github.sha }}' + $resourceGroupName = '${{ secrets.AZURE_RESOURCE_GROUP_NAME }}' + $acrName = '${{ secrets.ACR_NAME }}' + $imageTag = '${{ github.sha }}' + $administratorLogin = '${{ secrets.PODCASTDB_USER_LOGIN }}' + $administratorLoginPassword = '${{ secrets.PODCASTDB_USER_PASSWORD }}' + $storageAccountName = '${{ secrets.STORAGE_NAME }}' + $serverName= '${{ secrets.PODCASTDB_SERVER_NAME }}' + $kubernetesEnvName = '${{ secrets.KUBERNETES_ENV_NAME }}' + $workspaceName = '${{ secrets.WORKSPACE_NAME }}' + $apiName = '${{ secrets.API_RESOURCE_NAME }}' + $updaterName = '${{ secrets.UPDATER_RESOURCE_NAME }}' az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` diff --git a/.github/workflows/template-hub.yml b/.github/workflows/template-hub.yml index b9d5159..99c0291 100644 --- a/.github/workflows/template-hub.yml +++ b/.github/workflows/template-hub.yml @@ -23,15 +23,15 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - $deploymentName = "ghactionlistentogether${{ github.sha }}" - $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" - $webAppName = "${{ secrets.HUB_WEBAPP_NAME}}" - $servicePlanName = "${{ secrets.SERVICE_PLAN_NAME }}" - $storageAccountName = "${{ secrets.STORAGE_NAME }}" - $administratorLogin = "${{ secrets.PODCASTDB_USER_LOGIN }}" - $administratorLoginPassword = "${{ secrets.PODCASTDB_USER_PASSWORD }}" - $serverName = "${{ secrets.PODCASTDB_SERVER_NAME }}" - $apiName = "${{ secrets.API_RESOURCE_NAME }}"" + $deploymentName = 'ghactionlistentogether${{ github.sha }}' + $resourceGroupName = '${{ secrets.AZURE_RESOURCE_GROUP_NAME }}' + $webAppName = '${{ secrets.HUB_WEBAPP_NAME}}" + $servicePlanName = '${{ secrets.SERVICE_PLAN_NAME }}' + $storageAccountName = '${{ secrets.STORAGE_NAME }}' + $administratorLogin = '${{ secrets.PODCASTDB_USER_LOGIN }}' + $administratorLoginPassword = '${{ secrets.PODCASTDB_USER_PASSWORD }}' + $serverName = '${{ secrets.PODCASTDB_SERVER_NAME }}' + $apiName = '${{ secrets.API_RESOURCE_NAME }}'" az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index 6c034f5..76e0057 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -70,12 +70,12 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - $deploymentName = "ghaction${{ github.sha }}" - $resourceGroupName = "${{ secrets.AZURE_RESOURCE_GROUP_NAME }}" - $webAppName = "${{ secrets.WEBAPP_NAME }}" - $servicePlanName = "${{ secrets.SERVICE_PLAN_NAME }}" - $servicePlanSku = "${{ secrets.SERVICE_PLAN_SKU }}" - $hubWebAppName = "${{ secrets.HUB_WEBAPP_NAME }}" + $deploymentName = 'ghaction${{ github.sha }}' + $resourceGroupName = '${{ secrets.AZURE_RESOURCE_GROUP_NAME }}' + $webAppName = '${{ secrets.WEBAPP_NAME }}' + $servicePlanName = '${{ secrets.SERVICE_PLAN_NAME }}' + $servicePlanSku = '${{ secrets.SERVICE_PLAN_SKU }}' + $hubWebAppName = '${{ secrets.HUB_WEBAPP_NAME }}' $apiName = "${{secrets.API_RESOURCE_NAME}}"" az deployment group create -n "$($deploymentName)" ` From fcc67ee460330b38404c9d042b16008d41cfa89e Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:34:44 +0100 Subject: [PATCH 11/15] change double quote to simple --- .github/workflows/template-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-api.yml b/.github/workflows/template-api.yml index 641837b..8d3fde7 100644 --- a/.github/workflows/template-api.yml +++ b/.github/workflows/template-api.yml @@ -23,7 +23,7 @@ jobs: with: azPSVersion: "3.1.0" inlineScript: | - $deploymentName = "ghactionbgtasks${{ github.sha }}' + $deploymentName = 'ghactionbgtasks${{ github.sha }}' $resourceGroupName = '${{ secrets.AZURE_RESOURCE_GROUP_NAME }}' $acrName = '${{ secrets.ACR_NAME }}' From ae519654abae0b7b34d54d6f6a8dc599826d22fa Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:45:20 +0100 Subject: [PATCH 12/15] fix simple quote --- .github/workflows/template-hub.yml | 2 +- .github/workflows/template-web.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template-hub.yml b/.github/workflows/template-hub.yml index 99c0291..e21d7e0 100644 --- a/.github/workflows/template-hub.yml +++ b/.github/workflows/template-hub.yml @@ -25,7 +25,7 @@ jobs: inlineScript: | $deploymentName = 'ghactionlistentogether${{ github.sha }}' $resourceGroupName = '${{ secrets.AZURE_RESOURCE_GROUP_NAME }}' - $webAppName = '${{ secrets.HUB_WEBAPP_NAME}}" + $webAppName = '${{ secrets.HUB_WEBAPP_NAME }}' $servicePlanName = '${{ secrets.SERVICE_PLAN_NAME }}' $storageAccountName = '${{ secrets.STORAGE_NAME }}' $administratorLogin = '${{ secrets.PODCASTDB_USER_LOGIN }}' diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index 76e0057..ad7da8d 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -76,7 +76,7 @@ jobs: $servicePlanName = '${{ secrets.SERVICE_PLAN_NAME }}' $servicePlanSku = '${{ secrets.SERVICE_PLAN_SKU }}' $hubWebAppName = '${{ secrets.HUB_WEBAPP_NAME }}' - $apiName = "${{secrets.API_RESOURCE_NAME}}"" + $apiName = '${{ secrets.API_RESOURCE_NAME }}'' az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` From 1ad816e8d183e8950b695f5283e717a036a4b6ee Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:48:52 +0100 Subject: [PATCH 13/15] fix quote --- .github/workflows/template-hub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-hub.yml b/.github/workflows/template-hub.yml index e21d7e0..d4d7681 100644 --- a/.github/workflows/template-hub.yml +++ b/.github/workflows/template-hub.yml @@ -31,7 +31,7 @@ jobs: $administratorLogin = '${{ secrets.PODCASTDB_USER_LOGIN }}' $administratorLoginPassword = '${{ secrets.PODCASTDB_USER_PASSWORD }}' $serverName = '${{ secrets.PODCASTDB_SERVER_NAME }}' - $apiName = '${{ secrets.API_RESOURCE_NAME }}'" + $apiName = '${{ secrets.API_RESOURCE_NAME }}' az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` From 3826de9333f1608a7dcfa0daecf36698bd8f60c4 Mon Sep 17 00:00:00 2001 From: Soruk Date: Sat, 11 Feb 2023 22:59:47 +0100 Subject: [PATCH 14/15] fix double simple quote --- .github/workflows/template-web.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index ad7da8d..124e5a4 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -76,7 +76,7 @@ jobs: $servicePlanName = '${{ secrets.SERVICE_PLAN_NAME }}' $servicePlanSku = '${{ secrets.SERVICE_PLAN_SKU }}' $hubWebAppName = '${{ secrets.HUB_WEBAPP_NAME }}' - $apiName = '${{ secrets.API_RESOURCE_NAME }}'' + $apiName = '${{ secrets.API_RESOURCE_NAME }}' az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` From e4e261a9a06805532f03919f481d9d83ba063392 Mon Sep 17 00:00:00 2001 From: Soruk Date: Tue, 14 Feb 2023 20:56:51 +0100 Subject: [PATCH 15/15] Remove commented code Forgot to remove the code --- .github/workflows/template-web.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/template-web.yml b/.github/workflows/template-web.yml index 124e5a4..e96b32f 100644 --- a/.github/workflows/template-web.yml +++ b/.github/workflows/template-web.yml @@ -81,9 +81,7 @@ jobs: az deployment group create -n "$($deploymentName)" ` --resource-group "$($resourceGroupName)" ` --template-file deploy/Web/web.bicep ` - --parameters webAppName="$($webAppName)" servicePlanName="$($servicePlanName)" servicePlanSku="$($servicePlanSku)" hubWebAppName="$($hubWebAppName)" apiName="$($apiName)" - - # az deployment group create -n ghaction -g ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ secrets.WEBAPP_NAME }} servicePlanName=${{ secrets.SERVICE_PLAN_NAME }} servicePlanSku=${{ secrets.SERVICE_PLAN_SKU }} hubWebAppName=${{ secrets.HUB_WEBAPP_NAME }} apiName=${{secrets.API_RESOURCE_NAME}} updaterName=${{secrets.UPDATER_RESOURCE_NAME}} + --parameters webAppName="$($webAppName)" servicePlanName="$($servicePlanName)" servicePlanSku="$($servicePlanSku)" hubWebAppName="$($hubWebAppName)" apiName="$($apiName)" - name: Download web artifacts uses: actions/download-artifact@v3