From 1de1eb7623cc0deda0773f4b5f2af8c4915c66ef Mon Sep 17 00:00:00 2001 From: Arne Dumarey Date: Mon, 23 Sep 2024 16:03:24 +0200 Subject: [PATCH] ci: try status lambda --- .github/workflows/deploy-single.yml | 36 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy-single.yml b/.github/workflows/deploy-single.yml index 9d5c13249..abd41cdaa 100644 --- a/.github/workflows/deploy-single.yml +++ b/.github/workflows/deploy-single.yml @@ -191,23 +191,29 @@ jobs: FUNCTION_BACKOFFICE: ${{ github.event.inputs.environment == 'tst' && 'rr-sqsbackofficefunction' || github.event.inputs.environment == 'stg' && 'wr-sqsbackofficehandlerfunction' || github.event.inputs.environment == 'prd' && 'rr-sqsbackofficefunction' || '' }} FUNCTION_SNAPSHOT: ${{ github.event.inputs.environment == 'tst' && 'rr-sqssnapshotfunction' || github.event.inputs.environment == 'stg' && 'wr-sqssnapshothandlerfunction' || github.event.inputs.environment == 'prd' && 'rr-sqssnapshotfunction' || '' }} - - name: Promote Lambda(s) + - name: Promote BackOffice Lambda if: github.event.inputs.environment != 'prd' - shell: bash - run: | - docker pull ghcr.io/okigan/awscurl:latest + uses: Informatievlaanderen/build-pipeline/.github/actions/deploy-lambda@main + with: + function-name: rr-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: ${{ github.event.inputs.environment }} - docker run --rm okigan/awscurl --access_key $ACCESS_KEY_ID --secret_key $SECRET_ACCESS_KEY_ID --region $REGION -X POST -d '{ "deploy_target": "lambda", "version": "'$SEMVER'" }' $PROMOTEURL/$FUNCTION_BACKOFFICE/$ENVIRONMENT/deploy/v4/ - docker run --rm okigan/awscurl --access_key $ACCESS_KEY_ID --secret_key $SECRET_ACCESS_KEY_ID --region $REGION -X POST -d '{ "deploy_target": "lambda", "version": "'$SEMVER'" }' $PROMOTEURL/$FUNCTION_SNAPSHOT/$ENVIRONMENT/deploy/v4/ - env: - ACCESS_KEY_ID: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }} - SECRET_ACCESS_KEY_ID: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }} - ENVIRONMENT: ${{ github.event.inputs.environment }} - REGION: ${{ secrets.VBR_AWS_REGION_PRD }} - PROMOTEURL: ${{ vars.VBR_AWS_DEPLOY_LAMBDA_DEVOPS_BASEURL }} - SEMVER: ${{ github.event.inputs.version }} - FUNCTION_BACKOFFICE: rr-sqsbackofficefunction - FUNCTION_SNAPSHOT: rr-sqssnapshotfunction + - name: Promote Snapshot Lambda + if: github.event.inputs.environment != 'prd' + uses: Informatievlaanderen/build-pipeline/.github/actions/deploy-lambda@main + with: + function-name: rr-sqssnapshotfunction + 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: ${{ github.event.inputs.environment }} deploy_finish_slack: if: github.repository_owner == 'Informatievlaanderen'