Skip to content

Commit

Permalink
Merge pull request #313 from ovotech/add-s3-publish-for-tf
Browse files Browse the repository at this point in the history
Add s3 publish for tf
  • Loading branch information
Chris Every authored Feb 12, 2021
2 parents 8b6d26f + c88b9c2 commit 477e757
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,19 @@ jobs:
ZIP_NAME=cloud-key-rotator_${VERSION}_cloudfunction.zip
zip -R ${ZIP_NAME} '*.go' 'go.mod'
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_TAG} ${ZIP_NAME}
publish_tf_lambda_zip:
docker:
- image: python:3
steps:
- checkout
- run:
name: publish
command: |
VERSION=$(echo ${CIRCLE_TAG} | sed 's/^v//')
TARGET_FILE=cloud-key-rotator_${VERSION}_lambda.zip
curl -L https://github.com/ovotech/cloud-key-rotator/releases/download/v${VERSION}/${TARGET_FILE} -O
pip3 install awscli
aws s3 cp $TARGET_FILE s3://ckr-terraform-module-code --acl public-read
tf_check_aws:
executor: terraform/terraform-0_12
steps:
Expand Down Expand Up @@ -173,6 +185,14 @@ workflows:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
branches:
ignore: /.*/
- publish_tf_lambda_zip:
requires:
- goreleaser
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
branches:
ignore: /.*/
pr_pipeline:
jobs:
- go_fmt:
Expand Down

0 comments on commit 477e757

Please sign in to comment.