From bef6a2ae9ee4da77b53ce750af61cea352c30fff Mon Sep 17 00:00:00 2001 From: paule96 Date: Sun, 8 Oct 2023 04:35:32 +0200 Subject: [PATCH] fix main deployment (#35) now you can use the azure template again --- azure-pipelines.yml | 4 +++- deploayWebApp.bicep | 4 +--- main.bicep | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 53ed717..e66963a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -122,7 +122,9 @@ stages: changeLogType: 'commitBased' - stage: ReleaseToAzure displayName: Release to Azure - dependsOn: Build + dependsOn: + - Build + - ReleaseToGithub condition: succeeded() jobs: - deployment: DeployAzure diff --git a/deploayWebApp.bicep b/deploayWebApp.bicep index 740a208..12e78f3 100644 --- a/deploayWebApp.bicep +++ b/deploayWebApp.bicep @@ -109,10 +109,8 @@ resource deployWebApp 'Microsoft.Resources/deploymentScripts@2020-10-01' = if (e arguments: '-staticWebAppName ${webSiteName} -resourceGroupName ${resourceGroup().name}' scriptContent: ''' param( - [string] $githubToken, [string] $staticWebAppName, - [string] $resourceGroupName, - [string] $branch + [string] $resourceGroupName ) # take stable releases here $result = Invoke-RestMethod https://api.github.com/repos/codez-one/CZ.Azure.FileExchange/releases/latest -Headers @{"X-GitHub-Api-Version" = "2022-11-28" } diff --git a/main.bicep b/main.bicep index 67e14c9..7836ad0 100644 --- a/main.bicep +++ b/main.bicep @@ -12,7 +12,7 @@ module basics 'deployBasics.bicep' = { module webappDeployment 'deploayWebApp.bicep' = { name: 'deployment' params: { - webSiteName: basics.outputs.website.name + webSiteName: last(split(basics.outputs.website.resourceId, '/')) location: location } } @@ -23,8 +23,8 @@ module events 'deployEvent.bicep' = { webappDeployment ] params: { - baseUrl: 'https://${basics.outputs.website.properties.defaultHostname}' + baseUrl: webappDeployment.outputs.staticWebAppHost location: location - storageAccountName: basics.outputs.storage.name + storageAccountName: last(split(basics.outputs.storage.resourceId, '/')) } }