diff --git a/.github/workflows/deploy_newprd.yml b/.github/workflows/deploy_prd.yml similarity index 73% rename from .github/workflows/deploy_newprd.yml rename to .github/workflows/deploy_prd.yml index 4daaf387b..eff65ff8e 100644 --- a/.github/workflows/deploy_newprd.yml +++ b/.github/workflows/deploy_prd.yml @@ -31,7 +31,7 @@ jobs: SLACK_CHANNEL: ${{ secrets.VBR_NOTIFIER_CHANNEL_NAME }} REPOSITORY_NAME: ${{ env.REPOSITORY_NAME }} - deploy_to_production: + deploy_services_to_production: if: github.repository_owner == 'Informatievlaanderen' needs: [ deploy_to_production_start_slack ] name: Deploy to Production @@ -44,27 +44,27 @@ jobs: 'streetname-registry-backoffice-api', 'streetname-registry-consumer', 'streetname-registry-producer', - 'streetname-registry-migrator-streetname', 'streetname-registry-producer-snapshot-oslo', - 'streetname-registry-projections-backoffice', - 'streetname-registry-snapshot-verifier' + 'streetname-registry-projections-backoffice' ] steps: - name: CD services env: - BUILD_URL: ${{ secrets.VBR_AWS_BUILD_API }}/${{matrix.services}} - STATUS_URL: ${{ secrets.VBR_AWS_BUILD_STATUS_API }}/${{matrix.services}} - uses: informatievlaanderen/awscurl-polling-action/polling-action@v1.0.1 + 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: acc + environment: prd version: ${{ github.event.inputs.version }} status-url: $STATUS_URL deploy-url: $BUILD_URL access-key: ${{ secrets.VBR_AWS_BUILD_USER_ACCESS_KEY_ID }} secret-key: ${{ secrets.VBR_AWS_BUILD_USER_SECRET_ACCESS_KEY }} - region: eu-west-1 interval: 2 + deploy-target: 'agb_ecs_service' + domain: 'basisregisters' + project: 'basisregisters' - name: output CD services shell: bash @@ -73,9 +73,46 @@ jobs: 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: [ + #'streetname-registry-migrator-streetname', + 'streetname-registry-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_BUILD_USER_ACCESS_KEY_ID }} + secret-key: ${{ secrets.VBR_AWS_BUILD_USER_SECRET_ACCESS_KEY }} + 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_to_production] + needs: [deploy_services_to_production, deploy_tasks_to_production] name: Deploy lambda to production runs-on: ubuntu-latest