From 1b6f3719feb36969ddff5a664eb3802aef34ea0c Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Wed, 31 Jul 2024 11:40:43 +0200 Subject: [PATCH] ci: fix deployment of function app (#948) ## Description The function apps have changed names based on the unique hash added as postfix. Resolving for now by using the new name instead. For later it should be resolved more automatically, perhaps by using tags or updating secrets in gh actions from IAC ## Related Issue(s) - #{issue number} ## Verification - [ ] **Your** code builds clean without any errors or warnings - [ ] Manual testing done (required) - [ ] Relevant automated test added (if you find this hard, leave it and we'll help out) ## Documentation - [ ] Documentation is updated (either in `docs`-directory, Altinnpedia or a separate linked PR in [altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if applicable) --- .github/workflows/action-deploy-function.yml | 4 +++- .github/workflows/ci-cd-main.yml | 4 +++- .github/workflows/ci-cd-staging.yml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/action-deploy-function.yml b/.github/workflows/action-deploy-function.yml index 196177d6a..e64632b22 100644 --- a/.github/workflows/action-deploy-function.yml +++ b/.github/workflows/action-deploy-function.yml @@ -9,6 +9,8 @@ on: required: true AZURE_SUBSCRIPTION_ID: required: true + AZURE_FUNCTION_APP_NAME: + required: true inputs: function-app-name: @@ -60,6 +62,6 @@ jobs: uses: Azure/functions-action@v1 id: fa with: - app-name: ${{ inputs.function-app-name }} + app-name: ${{ secrets.AZURE_FUNCTION_APP_NAME }} package: "${{ inputs.function-project-path }}/output" publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} diff --git a/.github/workflows/ci-cd-main.yml b/.github/workflows/ci-cd-main.yml index 1a7478abd..a9326391e 100644 --- a/.github/workflows/ci-cd-main.yml +++ b/.github/workflows/ci-cd-main.yml @@ -117,8 +117,10 @@ jobs: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + # todo: resolve this automatically, or use tags + AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }} with: - function-app-name: "dp-be-test-slacknotifier-fa" + function-app-name: "slack-notifier" function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier" environment: test diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 3cb305be3..f2271282e 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -79,8 +79,10 @@ jobs: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + # todo: resolve this automatically, or use tags + AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }} with: - function-app-name: "dp-be-staging-slacknotifier-fa" + function-app-name: "slack-notifier" function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier" environment: staging