Skip to content

Commit

Permalink
ci: ensure we do not hit the character limit for deployment name (#1474)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

- 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)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
arealmaas authored Nov 15, 2024
1 parent 193b764 commit e87a375
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/workflow-deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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() }}
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit e87a375

Please sign in to comment.