diff --git a/.circleci/config.yml b/.circleci/config.yml index 0911773..c89aa5f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,11 +3,45 @@ version: 2.1 orbs: python: circleci/python@1.2 codecov: codecov/codecov@1.0.2 + terraform: circleci/terraform@2.1.0 workflows: - steamiebot: + test: jobs: - test-steamie + deploy_infrastructure: + jobs: + - terraform/validate: + checkout: true + context: terraform + path: tf + - terraform/plan: + checkout: true + context: terraform + path: tf + persist-workspace: true + requires: + - terraform/validate + - hold-apply: + type: approval + filters: + branches: + only: + - master + - feature/cd-tf + requires: + - terraform/plan + - terraform/apply: + attach-workspace: true + context: terraform + path: tf + filters: + branches: + only: + - master + - feature/cd-tf + requires: + - hold-apply jobs: test-steamie: diff --git a/tf/lambda.tf b/tf/lambda.tf index 9de603e..db33c00 100644 --- a/tf/lambda.tf +++ b/tf/lambda.tf @@ -1,6 +1,6 @@ data "archive_file" "application" { type = "zip" - source_dir = "../pylib/" + source_dir = "pylib/" output_path = "payload-lambda.zip" }