From c2725c4559545d1009669407fdf870668434e53a Mon Sep 17 00:00:00 2001 From: luizjhonata Date: Tue, 6 Feb 2024 16:23:46 -0300 Subject: [PATCH] feat(golang): added output variable siteName to be used as appName --- CHANGELOG.md | 1 + azure-devops/golang/stages/40-delivery/arm.yaml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c427308c..c598871d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Exceptions are acceptable depending on the circumstances (critical bug fixes tha - added step to create and delete firewall rule to run migrations - added the missing configuration to Azure DevOps deployment with JS - added a new step to replace the environment variables contained inside the `yaml` file +- added a script into the Golang `delivery` to get the new `siteName` variable ### Changed diff --git a/azure-devops/golang/stages/40-delivery/arm.yaml b/azure-devops/golang/stages/40-delivery/arm.yaml index c4d17b87..8500c1d6 100644 --- a/azure-devops/golang/stages/40-delivery/arm.yaml +++ b/azure-devops/golang/stages/40-delivery/arm.yaml @@ -89,9 +89,13 @@ stages: else echo "No Goose migration files found. Skipping Goose installation and migration." fi + - script: | + siteName=$(echo $(OUTPUTS.siteName.value) | tr -d '"') + echo "##vso[task.setvariable variable=siteName]$siteName" + displayName: 'Getting siteName Variable' - task: 'AzureFunctionApp@1' inputs: - appName: '$(ENVIRONMENT)-fn-$(AZM_FUNCTION_NAME)-$(AZM_LOCATION)' + appName: '$(siteName)' appType: 'functionAppLinux' azureSubscription: '$(AZM_SERVICE_CONNECTION)' package: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'