Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOTT-3919: Fixes production release #682

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ jobs:

plan-terraform:
executor: terraform
environment:
TF_CLI_ARGS: "-lock=false"
parameters:
environment:
type: string
Expand Down Expand Up @@ -180,8 +182,9 @@ jobs:
path: terraform/
backend_config_file: backends/<< parameters.environment >>.tfbackend
var_file: config_<< parameters.environment >>.tfvars
lock-timeout: 5m

checking:
ruby-checks:
docker:
- image: cimg/ruby:3.2.2-node
steps:
Expand Down Expand Up @@ -322,18 +325,21 @@ workflows:

deploy-to-development:
jobs:
- write-docker-tag:
name: write-docker-tag-dev
environment: development
<<: *filter-not-main

- checking:
- ruby-checks:
<<: *filter-not-main

- test:
context: trade-tariff
<<: *filter-not-main

- write-docker-tag:
name: write-docker-tag-dev
environment: development
<<: *filter-not-main
requires:
- ruby-checks
- test

- fmt-validate-terraform:
name: fmt-terraform-dev
context: trade-tariff-terraform-aws-development
Expand Down Expand Up @@ -368,6 +374,8 @@ workflows:
- deploy-dev:
context: trade-tariff
requires:
- test
- ruby-checks
- build-dev
<<: *filter-not-main

Expand All @@ -376,6 +384,7 @@ workflows:
context: trade-tariff-terraform-aws-development
environment: development
requires:
- test
- plan-terraform-dev
- build-and-push-dev
<<: *filter-not-main
Expand Down Expand Up @@ -468,14 +477,16 @@ workflows:
- deploy-production:
context: trade-tariff
<<: *filter-release
requires:
- promote-to-production?

- write-docker-tag:
name: write-docker-tag-prod-release
environment: production
<<: *filter-release

- apply-terraform:
name: apply-terraform-prod
context: trade-tariff-terraform-aws-staging
environment: production
requires:
- write-docker-tag-prod
- promote-to-production?
<<: *filter-main
- write-docker-tag-prod-release
<<: *filter-release
9 changes: 4 additions & 5 deletions terraform/backends/development.tfbackend
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
bucket = "terraform-state-development-844815912454"
key = "tariff-duty-calculator.tfstate"
region = "eu-west-2"
encrypt = true
dynamodb_table = "duty-calculator-lock-844815912454"
bucket = "terraform-state-development-844815912454"
key = "tariff-duty-calculator.tfstate"
region = "eu-west-2"
encrypt = true
Loading