@@ -131,42 +131,42 @@ jobs:
131131 ecr_repositories : ${{ needs.prepare-build.outputs.ecr_repos }}
132132 current_image_tag : ${{ needs.prepare-build.outputs.image_tag1 }}
133133 additional_image_tag : ${{ needs.prepare-build.outputs.image_tag2 }}
134- deploy :
135- needs : [prepare-build, post-build]
136- # Add always() as otherwise the job is being skipped: https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
137- if : ${{ always() && needs.post-build.result == 'success' && fromJSON(needs.prepare-build.outputs.trigger_automatic_deployment) }}
138- runs-on : ubuntu-22.04
139- strategy :
140- matrix :
141- customer : ${{ fromJSON(needs.prepare-build.outputs.customers) }}
142- steps :
143- - name : determine stage to be deployed to
144- id : get-parameters
145- run : |
146- # Try to split the customer from the format customer:stage
147- customer="$(echo "$CUSTOMER_FULL" | cut -d ":" -s -f 1)"
148- stage="$(echo "$CUSTOMER_FULL" | cut -d ":" -s -f 2)"
149- # If nothing is found, we assume we just got the customer
150- if [ -z "$customer" ]; then
151- customer="$CUSTOMER_FULL"
152- fi
153- # And will deploy to develop if no stage is defined
154- if [ -z "$stage" ]; then
155- echo "customer $CUSTOMER_FULL does not include stage, using develop instead"
156- stage="develop"
157- fi
158- echo "customer=$customer" >> "$GITHUB_OUTPUT"
159- echo "stage=$stage" >> "$GITHUB_OUTPUT"
160- env :
161- CUSTOMER_FULL : ${{ matrix.customer }}
162- shell : bash
163- - name : trigger deployment
164- uses : datavisyn/github-action-trigger-workflow@v1
165- with :
166- owner : " datavisyn"
167- repo : " infrastructure-k8s"
168- github_token : ${{ secrets.DATAVISYN_BOT_REPO_TOKEN }}
169- workflow_file_name : " deploy-app.yml"
170- ref : ${{ env.WORKFLOW_BRANCH }}
171- github_user : ${{ secrets.DV_BOT_USER }}
172- client_payload : ' { "app": "${{ needs.prepare-build.outputs.app }}", "customer": "${{ steps.get-parameters.outputs.customer }}", "stage": "${{ steps.get-parameters.outputs.stage }}", "sub_app": "${{ needs.prepare-build.outputs.sub_app }}", "branch": "${{ needs.prepare-build.outputs.image_tag2 }}" }'
134+ # deploy:
135+ # needs: [prepare-build, post-build]
136+ # # Add always() as otherwise the job is being skipped: https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
137+ # if: ${{ always() && needs.post-build.result == 'success' && fromJSON(needs.prepare-build.outputs.trigger_automatic_deployment) }}
138+ # runs-on: ubuntu-22.04
139+ # strategy:
140+ # matrix:
141+ # customer: ${{ fromJSON(needs.prepare-build.outputs.customers) }}
142+ # steps:
143+ # - name: determine stage to be deployed to
144+ # id: get-parameters
145+ # run: |
146+ # # Try to split the customer from the format customer:stage
147+ # customer="$(echo "$CUSTOMER_FULL" | cut -d ":" -s -f 1)"
148+ # stage="$(echo "$CUSTOMER_FULL" | cut -d ":" -s -f 2)"
149+ # # If nothing is found, we assume we just got the customer
150+ # if [ -z "$customer" ]; then
151+ # customer="$CUSTOMER_FULL"
152+ # fi
153+ # # And will deploy to develop if no stage is defined
154+ # if [ -z "$stage" ]; then
155+ # echo "customer $CUSTOMER_FULL does not include stage, using develop instead"
156+ # stage="develop"
157+ # fi
158+ # echo "customer=$customer" >> "$GITHUB_OUTPUT"
159+ # echo "stage=$stage" >> "$GITHUB_OUTPUT"
160+ # env:
161+ # CUSTOMER_FULL: ${{ matrix.customer }}
162+ # shell: bash
163+ # - name: trigger deployment
164+ # uses: datavisyn/github-action-trigger-workflow@v1
165+ # with:
166+ # owner: "datavisyn"
167+ # repo: "infrastructure-k8s"
168+ # github_token: ${{ secrets.DATAVISYN_BOT_REPO_TOKEN }}
169+ # workflow_file_name: "deploy-app.yml"
170+ # ref: ${{ env.WORKFLOW_BRANCH }}
171+ # github_user: ${{ secrets.DV_BOT_USER }}
172+ # client_payload: '{ "app": "${{ needs.prepare-build.outputs.app }}", "customer": "${{ steps.get-parameters.outputs.customer }}", "stage": "${{ steps.get-parameters.outputs.stage }}", "sub_app": "${{ needs.prepare-build.outputs.sub_app }}", "branch": "${{ needs.prepare-build.outputs.image_tag2 }}" }'
0 commit comments