From 49d398f0475d15eacd2afd7601bf38be06291eec Mon Sep 17 00:00:00 2001 From: Arne Dumarey Date: Mon, 23 Sep 2024 20:40:00 +0200 Subject: [PATCH] fix: ci deploy lambda --- .github/workflows/release.yml | 42 +++++++++++++++-------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1da8b6c4..332aab0f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -766,18 +766,15 @@ jobs: aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} - name: Promote Lambda(s) - shell: bash - run: | - echo pulling awscurl docker image - docker pull ghcr.io/okigan/awscurl:latest - echo 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/sr-sqsbackofficefunction/tst/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/sr-sqsbackofficefunction/tst/deploy/v4/ - env: - 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 }} - PROMOTEURL: ${{ vars.VBR_AWS_DEPLOY_LAMBDA_DEVOPS_BASEURL }} - SEMVER: ${{ needs.release.outputs.version }} + uses: Informatievlaanderen/build-pipeline/.github/actions/deploy-lambda@main + with: + function-name: sr-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: ${{ needs.release.outputs.version }} + environment: tst deploy_to_test_finish_slack: if: github.repository_owner == 'Informatievlaanderen' @@ -915,18 +912,15 @@ jobs: aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} - name: Promote Lambda(s) - shell: bash - run: | - echo pulling awscurl docker image - docker pull ghcr.io/okigan/awscurl:latest - echo 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/sr-sqsbackofficefunction/stg/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/sr-sqsbackofficefunction/stg/deploy/v4/ - env: - 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 }} - PROMOTEURL: ${{ vars.VBR_AWS_DEPLOY_LAMBDA_DEVOPS_BASEURL }} - SEMVER: ${{ needs.release.outputs.version }} + uses: Informatievlaanderen/build-pipeline/.github/actions/deploy-lambda@main + with: + function-name: sr-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: ${{ needs.release.outputs.version }} + environment: stg deploy_to_new_staging_finish_slack: if: github.repository_owner == 'Informatievlaanderen'