From 1e87ab3621393b3d966cd1929eb1c9ccf76346f0 Mon Sep 17 00:00:00 2001 From: Tim Lardner Date: Tue, 6 Jul 2021 21:50:41 +0100 Subject: [PATCH] Try out new deployment --- .circleci/config.yml | 36 +++++++++++++++++++++++++++++++++++- tf/lambda.tf | 2 +- 2 files changed, 36 insertions(+), 2 deletions(-) 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" }