diff --git a/.github/workflows/image-and-helm-publish-check-deploy-on-push-scheduled.yml b/.github/workflows/image-and-helm-publish-check-deploy-on-push-scheduled.yml index 87debf3..8a917ce 100644 --- a/.github/workflows/image-and-helm-publish-check-deploy-on-push-scheduled.yml +++ b/.github/workflows/image-and-helm-publish-check-deploy-on-push-scheduled.yml @@ -65,30 +65,33 @@ jobs: if: ${{ github.event_name == 'push' && !startsWith(github.ref_name,'dependabot/') && needs.check_deployment_clearance.outputs.deployment_clearance == 'true' }} runs-on: ubuntu-latest outputs: - SELECT_HELM_VERION_GENERATION: ${{ steps.select_generation.outputs.SELECT_HELM_VERION_GENERATION }} + SELECT_HELM_VERSION_GENERATION: ${{ steps.select_generation.outputs.SELECT_HELM_VERSION_GENERATION }} SELECT_IMAGE_TAG_GENERATION: ${{ steps.select_generation.outputs.SELECT_IMAGE_TAG_GENERATION }} steps: - id: select_generation shell: bash run: | if ${{ github.ref_name == 'main' }}; then - echo "SELECT_HELM_VERION_GENERATION=timestamp" >> "$GITHUB_OUTPUT" + echo "SELECT_HELM_VERSION_GENERATION=timestamp" >> "$GITHUB_OUTPUT" echo "SELECT_IMAGE_TAG_GENERATION=commit_hash" >> "$GITHUB_OUTPUT" else - echo "SELECT_HELM_VERION_GENERATION=ticket_from_branch_timestamp" >> "$GITHUB_OUTPUT" - echo "SELECT_IMAGE_TAG_GENERATION=ticket_from_branch" >> "$GITHUB_OUTPUT" + echo "SELECT_HELM_VERSION_GENERATION=specified" >> "$GITHUB_OUTPUT" + echo "SELECT_IMAGE_TAG_GENERATION=specified" >> "$GITHUB_OUTPUT" fi release_helm: if: ${{ github.event_name == 'push' && !startsWith(github.ref_name,'dependabot/') }} - needs: + needs: + - create_branch_identifier - select_helm_version_generation_and_image_tag_generation uses: dBildungsplattform/dbp-github-workflows/.github/workflows/chart-release.yaml@7 secrets: inherit with: chart_name: dbildungs-iam-ldap - helm_chart_version_generation: ${{ needs. select_helm_version_generation_and_image_tag_generation.outputs.SELECT_HELM_VERION_GENERATION }} - image_tag_generation: ${{ needs. select_helm_version_generation_and_image_tag_generation.outputs.SELECT_IMAGE_TAG_GENERATION }} + helm_chart_version_generation: ${{ needs. select_helm_version_generation_and_image_tag_generation.outputs.SELECT_HELM_VERSION_GENERATION }} + helm_chart_version: ${{ github.ref_name == 'main' && '' || needs.create_branch_identifier.outputs.chart_version_from_branch }} + image_tag_generation: ${{ needs. select_helm_version_generation_and_image_tag_generation.outputs.SELECT_IMAGE_TAG_GENERATION }} + image_tag: ${{ github.ref_name == 'main' && '' || needs.create_branch_identifier.outputs.image_tag_from_branch }} wait_for_helm_chart_to_get_published: needs: @@ -101,13 +104,13 @@ jobs: branch_meta: if: ${{ github.event_name == 'push' && !startsWith(github.ref_name,'dependabot/') }} - uses: dBildungsplattform/spsh-app-deploy/.github/workflows/get-branch-meta.yml@3 + uses: dBildungsplattform/spsh-app-deploy/.github/workflows/get-branch-meta.yml@6 create_branch_identifier: if: ${{ github.event_name == 'push' && !startsWith(github.ref_name,'dependabot/') }} needs: - branch_meta - uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy-branch-to-namespace.yml@3 + uses: dBildungsplattform/spsh-app-deploy/.github/workflows/convert-branch-name.yml@6 with: branch: ${{ needs.branch_meta.outputs.branch }} @@ -117,19 +120,21 @@ jobs: - branch_meta - create_branch_identifier - wait_for_helm_chart_to_get_published - uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy.yml@5 + uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy.yml@6 with: dbildungs_iam_server_branch: ${{ needs.branch_meta.outputs.ticket }} schulportal_client_branch: ${{ needs.branch_meta.outputs.ticket }} dbildungs_iam_keycloak_branch: ${{ needs.branch_meta.outputs.ticket }} dbildungs_iam_ldap_branch: ${{ needs.branch_meta.outputs.ticket }} namespace: ${{ needs.create_branch_identifier.outputs.namespace_from_branch }} + database_recreation: ${{ github.ref_name == 'main' && 'true' || 'false' }} + # database_recreation: "true" # to force database recreation this has be set to true secrets: inherit # On Delete create_branch_identifier_for_deletion: if: ${{ github.event_name == 'delete' && github.event.ref_type == 'branch' }} - uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy-branch-to-namespace.yml@3 + uses: dBildungsplattform/spsh-app-deploy/.github/workflows/convert-branch-name.yml@6 with: branch: ${{ github.event.ref }}