Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: designer cd #13466

Merged
merged 5 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/deploy-designer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
construct-environments-array:
uses: ./.github/workflows/template-construct-environments.yaml
with:
environments: ${{ github.event.inputs.environments || 'staging,prod' }}
environments: ${{ github.event.inputs.environments || 'staging,preapproved-prod' }}

determine-tag:
needs: get-short-sha
Expand Down Expand Up @@ -103,9 +103,10 @@ jobs:
tag: ${{ needs.determine-tag.outputs.tag }}
registry-name: altinntjenestercontainerregistry.azurecr.io
environment: ${{ matrix.environment }}
artifact-environment: ${{ matrix.environment == 'preapproved-prod' && 'prod' || matrix.environment }}
config-chart-name: altinn-designer-config
artifact-name: altinn-designer
helm-set-arguments: environmentName=${{ matrix.environment }},chartVersion=0.1.0+${{ needs.determine-tag.outputs.tag }},imageTag=${{ needs.determine-tag.outputs.tag }},dbMigrationsTag=${{ needs.determine-tag.outputs.tag }}
helm-set-arguments: environmentName=${{ matrix.environment == 'preapproved-prod' && 'prod' || matrix.environment }},chartVersion=0.1.0+${{ needs.determine-tag.outputs.tag }},imageTag=${{ needs.determine-tag.outputs.tag }},dbMigrationsTag=${{ needs.determine-tag.outputs.tag }}
secrets:
client-id: ${{ secrets.AZURE_CLIENT_ID_FC }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FC }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/template-flux-config-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
environment:
required: true
type: string
artifact-environment:
required: false
type: string
config-chart-name:
required: true
type: string
Expand Down Expand Up @@ -72,12 +75,14 @@ jobs:

- name: Push config artifact
run: |
flux push artifact oci://${{ inputs.registry-name }}/configs/${{ inputs.artifact-name }}-${{ inputs.environment }}:${{ inputs.tag }} \
artifact_env=${{ inputs.artifact-environment || inputs.environment }}
flux push artifact oci://${{ inputs.registry-name }}/configs/${{ inputs.artifact-name }}-${artifact_env}:${{ inputs.tag }} \
--path="./${{ inputs.config-chart-name }}-rendered" \
--source="$(git config --get remote.origin.url)" \
--revision="$(git branch --show-current)/$(git rev-parse HEAD)"

- name: Tag artifact as latest
run: |
flux tag artifact oci://${{ inputs.registry-name }}/configs/${{ inputs.artifact-name }}-${{ inputs.environment }}:${{ inputs.tag }} --tag latest
artifact_env=${{ inputs.artifact-environment || inputs.environment }}
flux tag artifact oci://${{ inputs.registry-name }}/configs/${{ inputs.artifact-name }}-${artifact_env}:${{ inputs.tag }} --tag latest