Skip to content

Commit

Permalink
ci: ensure version is stored on app deploy (#1762)
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 -->

All environments still seem to store the version number only if the jobs
are not skipped. Refactoring to removing "Cancelled" checking for if
jobs are skipped to ensure that we store the version if the apps are
deployed.

## Related Issue(s)

- #1692

## 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)
  • Loading branch information
arealmaas authored Jan 30, 2025
1 parent bfaffac commit 9b63326
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
store-apps-version:
name: Store Latest Deployed Apps Version as GitHub Variable
needs: [deploy-apps, get-current-version]
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }}
if: ${{ always() && !failure() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }}
uses: ./.github/workflows/workflow-store-github-env-variable.yml
with:
variable_name: LATEST_DEPLOYED_APPS_VERSION
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
store-apps-version:
name: Store Latest Deployed Apps Version as GitHub Variable
needs: [deploy-apps, get-current-version]
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }}
if: ${{ always() && !failure() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }}
uses: ./.github/workflows/workflow-store-github-env-variable.yml
with:
variable_name: LATEST_DEPLOYED_APPS_VERSION
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-yt01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
store-apps-version:
name: Store Latest Deployed Apps Version as GitHub Variable
needs: [deploy-apps, get-current-version]
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }}
if: ${{ always() && !failure() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }}
uses: ./.github/workflows/workflow-store-github-env-variable.yml
with:
variable_name: LATEST_DEPLOYED_APPS_VERSION
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
outputs:
deployment_executed:
description: "Indicates if the deployment was actually executed"
value: ${{ jobs.deploy-apps.result == 'success' && jobs.deploy-jobs.result == 'success' && !inputs.dryRun }}
value: ${{ jobs.deploy-apps.result == 'success' && (jobs.deploy-jobs.result == 'success' || jobs.deploy-jobs.result == 'skipped') && !inputs.dryRun }}
secrets:
AZURE_CLIENT_ID:
required: true
Expand Down

0 comments on commit 9b63326

Please sign in to comment.