Skip to content

Commit

Permalink
ci: try status lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Sep 23, 2024
1 parent fbc3ef5 commit 1de1eb7
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/deploy-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1de1eb7

Please sign in to comment.