From e87a375c7ca9a39eeed8fce44646113144cca60f Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Fri, 15 Nov 2024 11:57:35 +0100 Subject: [PATCH] ci: ensure we do not hit the character limit for deployment name (#1474) ## Description - Ensure that we do not hit the character limit for deployment names. - Removing unnecessary parts of the name as it is still very much visible what environment this deployment is related to. Mostly for the overview in the image. - Improve job name for jobs :meta:. This was not that visible before. ![image](https://github.com/user-attachments/assets/1ea00dc2-0ecd-4f5b-b053-cbd950931405) ![image](https://github.com/user-attachments/assets/58a4c79c-e033-42db-9f34-a5903584bce9) ![CleanShot 2024-11-15 at 11 47 21@2x](https://github.com/user-attachments/assets/33a03ffe-7c30-47f5-bc04-06e4029dddac) ## Related Issue(s) - #N/A Failing workflow: https://github.com/digdir/dialogporten/actions/runs/11854449350/job/33036707915?pr=1473 ## 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) ## Summary by CodeRabbit - **Chores** - Simplified deployment naming conventions for migration and application jobs. - Organized deployment jobs into three main sections for better clarity. - Maintained concurrency management and conditional logic for deployments. --- .github/workflows/workflow-deploy-apps.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/workflow-deploy-apps.yml b/.github/workflows/workflow-deploy-apps.yml index 4a929e80a..2341d0081 100644 --- a/.github/workflows/workflow-deploy-apps.yml +++ b/.github/workflows/workflow-deploy-apps.yml @@ -85,7 +85,7 @@ jobs: template: ./.azure/applications/web-api-migration-job/main.bicep resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} deploymentMode: Incremental - deploymentName: "dp-be-${{ inputs.environment }}-web-api-migration-job-${{ inputs.version }}" + deploymentName: "web-api-migration-job-${{ inputs.version }}" region: ${{ inputs.region }} failOnStdErr: false additionalArguments: '--what-if' @@ -106,7 +106,7 @@ jobs: template: ./.azure/applications/web-api-migration-job/main.bicep resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} deploymentMode: Incremental - deploymentName: "dp-be-${{ inputs.environment }}-web-api-migration-job-${{ inputs.version }}" + deploymentName: "web-api-migration-job-${{ inputs.version }}" region: ${{ inputs.region }} failOnStdErr: false parameters: ./.azure/applications/web-api-migration-job/${{ inputs.environment }}.bicepparam @@ -183,7 +183,7 @@ jobs: template: ./.azure/applications/${{ matrix.name }}/main.bicep resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} deploymentMode: Incremental - deploymentName: dp-be-${{ inputs.environment }}-${{ matrix.name }}-${{ inputs.version }} + deploymentName: "${{ matrix.name }}-${{ inputs.version }}" region: ${{ inputs.region }} failOnStdErr: false additionalArguments: '--what-if' @@ -208,7 +208,7 @@ jobs: template: ./.azure/applications/${{ matrix.name }}/main.bicep resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} deploymentMode: Incremental - deploymentName: dp-be-${{ inputs.environment }}-${{ matrix.name }}-${{ inputs.version }} + deploymentName: ${{ matrix.name }}-${{ inputs.version }} region: ${{ inputs.region }} failOnStdErr: false parameters: ./.azure/applications/${{ matrix.name }}/${{ inputs.environment }}.bicepparam @@ -229,7 +229,7 @@ jobs: run: az logout deploy-jobs: - name: Deploy jobs to ${{ inputs.environment }} + name: Deploy job ${{ matrix.name }} to ${{ inputs.environment }} runs-on: ubuntu-latest # Should run even though the migration job was skipped if: ${{ always() && !failure() && !cancelled() }} @@ -271,7 +271,7 @@ jobs: template: ./.azure/applications/${{ matrix.name }}/main.bicep resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} deploymentMode: Incremental - deploymentName: dp-be-${{ inputs.environment }}-${{ matrix.name }}-${{ inputs.version }} + deploymentName: ${{ matrix.name }}-${{ inputs.version }} region: ${{ inputs.region }} failOnStdErr: false additionalArguments: '--what-if' @@ -293,7 +293,7 @@ jobs: template: ./.azure/applications/${{ matrix.name }}/main.bicep resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }} deploymentMode: Incremental - deploymentName: dp-be-${{ inputs.environment }}-${{ matrix.name }}-${{ inputs.version }} + deploymentName: ${{ matrix.name }}-${{ inputs.version }} region: ${{ inputs.region }} failOnStdErr: false parameters: ./.azure/applications/${{ matrix.name }}/${{ inputs.environment }}.bicepparam