Fix version check lambda version bump

main
Elie 2021-04-27 17:27:12 +02:00 committed by sundowndev
parent 937154e23b
commit 6e68f81ac7
1 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,5 @@
version: 2.1 version: 2.1
orbs: orbs:
aws-cli: circleci/aws-cli@1.3.0
go: circleci/go@1.5.0 go: circleci/go@1.5.0
jobs: jobs:
build: build:
@ -167,15 +166,18 @@ jobs:
git commit -m "Updated to version ${CIRCLE_TAG}" git commit -m "Updated to version ${CIRCLE_TAG}"
git push git push
update-lambda: update-lambda:
executor: aws-cli/default
environment: environment:
FUNCTION_NAME: driftctl-version FUNCTION_NAME: driftctl-version
docker:
- image: cimg/base:2021.04
steps: steps:
- aws-cli/install
- run: - run:
name: "Update Lambda version" name: "Update Lambda version"
command: | command: |
aws lambda update-function-configuration --function-name $FUNCTION_NAME --environment "{\"Variables\":{\"LATEST_VERSION\":\"$CIRCLE_TAG\"}}" wget "https://github.com/cloudskiff/lambda-env-updater/releases/download/v1.0.0/lambda-env-updater_linux_amd64" && chmod +x lambda-env-updater_linux_amd64
./lambda-env-updater_linux_amd64\
-name ${FUNCTION_NAME}\
-env "LATEST_VERSION=${CIRCLE_TAG}"
workflows: workflows:
nightly: nightly:
jobs: jobs: