Skip to content

Commit

Permalink
Split CI prov into infra/cluster/nodes (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelhar authored Jan 24, 2024
1 parent 2628577 commit 1670fc0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,27 @@ commands:
name: Terraform init/validate/apply
working_directory: tests/deploy
command: bash ci-deploy.sh deploy
tf_deploy_infra:
description: "Terraform deploy Infra"
steps:
- run:
name: Terraform deploy Infra
working_directory: tests/deploy
command: bash ci-deploy.sh deploy_infra
tf_deploy_cluster:
description: "Terraform deploy Cluster"
steps:
- run:
name: Terraform deploy Cluster
working_directory: tests/deploy
command: bash ci-deploy.sh deploy_cluster
tf_deploy_nodes:
description: "Terraform deploy Nodes"
steps:
- run:
name: Terraform deploy Nodes
working_directory: tests/deploy
command: bash ci-deploy.sh deploy_nodes
tf_deploy_single_node:
description: "Terraform deploy single-node"
steps:
Expand All @@ -135,7 +156,9 @@ commands:
- aws-cli/setup:
role-arn: "${AWS_IAM_ROLE}"
session-duration: "43200"
- tf_init_apply
- tf_deploy_infra
- tf_deploy_cluster
- tf_deploy_nodes
tf_destroy:
description: "Terraform destroy"
steps:
Expand Down Expand Up @@ -205,7 +228,7 @@ jobs:
- set_mod_source_latest_rel
- tf_deploy
- set_mod_source_current
- tf_init_apply
- tf_deploy
- tf_destroy

workflows:
Expand Down
12 changes: 12 additions & 0 deletions tests/deploy/ci-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ setup_single_node_tf() {
set_mod_src "$MOD_SOURCE" "${node_deploy_mod_dir}/main.tf" "single_node"
}

deploy_infra() {
deploy "infra"
}

deploy_cluster() {
deploy "cluster"
}

deploy_nodes() {
deploy "nodes"
}

deploy_single_node() {
deploy "single-node"
}
Expand Down

0 comments on commit 1670fc0

Please sign in to comment.