Skip to content

Manual Production Deploy 2.7.3 #13

Manual Production Deploy 2.7.3

Manual Production Deploy 2.7.3 #13

Workflow file for this run

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: Parse repository name
run: echo REPOSITORY_NAME=$(echo ""$GITHUB_REPOSITORY"" | awk -F / '{print $2}' | sed -e ""s/:refs//"") >> $GITHUB_ENV
shell: bash
- name: Notify deployment started
uses: slackapi/[email protected]
with:
channel-id: '#team-dinosaur-dev'
slack-message: Deployment of basisregisters-integration to production has started
env:
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }}
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }}
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: [
'integration-suspicious-cases-api'
]
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: [
'integration-veka',
'integration-bosa-full-download',
'integration-data-integrity',
'integration-gtmf-meldingen'
]
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 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_to_production_finish_slack:
if: github.repository_owner == 'Informatievlaanderen'
needs: [ deploy_services_to_production, deploy_tasks_to_production ]
name: Deploy to production finished
runs-on: ubuntu-latest
steps:
- name: Parse repository name
run: echo REPOSITORY_NAME=$(echo ""$GITHUB_REPOSITORY"" | awk -F / '{print $2}' | sed -e ""s/:refs//"") >> $GITHUB_ENV
shell: bash
- name: Notify deployment finished
uses: slackapi/[email protected]
with:
channel-id: '#team-dinosaur-dev'
slack-message: Deployment of basisregisters-integration to production has finished
env:
SLACK_BOT_TOKEN: ${{ secrets.VBR_SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }}
REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }}