Manual Production Deploy 5.14.2 #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manual Production Deploy | |
| run-name: 'Manual Production Deploy ${{ github.event.inputs.version }}' | |
| concurrency: Manual Production Deploy | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version' | |
| required: true | |
| jobs: | |
| deploy_to_production_start_slack: | |
| if: github.repository_owner == 'Informatievlaanderen' | |
| name: Deploy to production started | |
| environment: prd | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Notify deployment started | |
| uses: slackapi/slack-github-action@v2 | |
| with: | |
| method: chat.postMessage | |
| token: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | |
| payload: | | |
| channel: '#team-dinosaur-dev' | |
| text: 'Deployment of parcel-registry to production has started' | |
| deploy_services_to_production: | |
| if: github.repository_owner == 'Informatievlaanderen' | |
| needs: [ deploy_to_production_start_slack ] | |
| name: Deploy to Production | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| services: [ | |
| 'parcel-api', | |
| 'parcel-backoffice-api', | |
| 'parcel-consumer-address', | |
| 'parcel-producer', | |
| 'parcel-producer-snapshot-oslo', | |
| 'parcel-producer-ldes', | |
| 'parcel-projections', | |
| 'parcel-projections-backoffice' | |
| ] | |
| steps: | |
| - name: CD services | |
| env: | |
| BUILD_URL: ${{ vars.VBR_AWS_BUILD_API_DEVOPS }}/${{matrix.services}} | |
| STATUS_URL: ${{ vars.VBR_AWS_BUILD_STATUS_API_DEVOPS }}/${{matrix.services}} | |
| uses: informatievlaanderen/awscurl-polling-action/polling-action@main | |
| with: | |
| environment: prd | |
| version: ${{ github.event.inputs.version }} | |
| status-url: $STATUS_URL | |
| deploy-url: $BUILD_URL | |
| access-key: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }} | |
| secret-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }} | |
| interval: 2 | |
| deploy-target: 'agb_ecs_service' | |
| domain: 'basisregisters' | |
| project: 'basisregisters' | |
| - name: output CD services | |
| shell: bash | |
| run: | | |
| echo build-uuid: ${{ steps.awscurl-polling-action.outputs.build-uuid }} | |
| echo Status: ${{ steps.awscurl-polling-action.outputs.status }} | |
| echo ${{ steps.awscurl-polling-action.outputs.final-message }} | |
| deploy_tasks_to_production: | |
| if: github.repository_owner == 'Informatievlaanderen' | |
| needs: [ deploy_to_production_start_slack ] | |
| name: Deploy to Production | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| services: [ | |
| 'parcel-importer-grb', | |
| 'parcel-snapshot-verifier' | |
| ] | |
| steps: | |
| - name: CD tasks | |
| env: | |
| BUILD_URL: ${{ vars.VBR_AWS_BUILD_API_DEVOPS }}/${{matrix.services}} | |
| STATUS_URL: ${{ vars.VBR_AWS_BUILD_STATUS_API_DEVOPS }}/${{matrix.services}} | |
| uses: informatievlaanderen/awscurl-polling-action/polling-action@main | |
| with: | |
| environment: prd | |
| version: ${{ github.event.inputs.version }} | |
| status-url: $STATUS_URL | |
| deploy-url: $BUILD_URL | |
| access-key: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }} | |
| secret-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }} | |
| interval: 2 | |
| deploy-target: 'ecs_scheduled_task' | |
| domain: 'basisregisters' | |
| project: 'basisregisters' | |
| - name: output CD tasks | |
| shell: bash | |
| run: | | |
| echo build-uuid: ${{ steps.awscurl-polling-action.outputs.build-uuid }} | |
| echo Status: ${{ steps.awscurl-polling-action.outputs.status }} | |
| echo ${{ steps.awscurl-polling-action.outputs.final-message }} | |
| deploy_lambda_to_production: | |
| if: github.repository_owner == 'Informatievlaanderen' | |
| needs: [deploy_services_to_production, deploy_tasks_to_production] | |
| name: Deploy lambda to production | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: CD Lambda(s) Configure credentials | |
| uses: aws-actions/[email protected] | |
| with: | |
| aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }} | |
| aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }} | |
| aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} | |
| - name: Promote Lambda(s) | |
| uses: Informatievlaanderen/build-pipeline/.github/actions/deploy-lambda-v4@main | |
| with: | |
| function-name: par-sqsbackofficefunction | |
| deploy-url: ${{ vars.VBR_AWS_DEPLOY_LAMBDA_DEVOPS_BASEURL }} | |
| access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }} | |
| secret-access-key-id: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }} | |
| region: ${{ secrets.VBR_AWS_REGION_PRD }} | |
| version: ${{ github.event.inputs.version }} | |
| environment: prd | |
| deploy_to_production_finish: | |
| if: github.repository_owner == 'Informatievlaanderen' | |
| needs: [ deploy_lambda_to_production ] | |
| name: Deploy to production finished | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Notify deployment finished | |
| uses: slackapi/slack-github-action@v2 | |
| with: | |
| method: chat.postMessage | |
| token: ${{ secrets.VBR_SLACK_BOT_TOKEN }} | |
| payload: | | |
| channel: '#team-dinosaur-dev' | |
| text: 'Deployment of parcel-registry to production has finished' |