Skip to content
Snippets Groups Projects

WIP: Create openstack-in-openstack based CI for cloud4

Open David Visscher requested to merge os-in-os into main
+ 8
12
@@ -16,12 +16,12 @@ variables:
TF_VAR_ssh_private_key_file: .terraform.key
TF_VAR_ssh_public_key_file: .terraform.key.pub
# cache:
# key: ${TF_STATE_NAME}
# paths:
# - terraform/openstack/.terraform/
# - terraform/openstack/.terraform.key
# - terraform/openstack/.terraform.key.pub
cache:
key: ${TF_STATE_NAME}
paths:
- terraform/openstack/.terraform/
- terraform/openstack/.terraform.key
- terraform/openstack/.terraform.key.pub
terraform_init:
image: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
@@ -75,8 +75,6 @@ terraform_plan:
script:
- echo "$TF_ROOT"
- cd ${TF_ROOT}
- "if [ ! -f .terraform.key ]; then ssh-keygen -t ed25519 -f .terraform.key -N ''; fi"
- gitlab-terraform init
- gitlab-terraform plan
- gitlab-terraform plan-json
artifacts:
@@ -97,9 +95,9 @@ terraform_apply:
script:
- echo "$TF_ROOT"
- cd ${TF_ROOT}
- "if [ ! -f .terraform.key ]; then ssh-keygen -t ed25519 -f .terraform.key -N ''; fi"
- gitlab-terraform init
- gitlab-terraform apply
dependencies:
- terraform_plan
only:
- main
- merge_requests
@@ -112,8 +110,6 @@ terraform_destroy:
script:
- echo "$TF_ROOT"
- cd ${TF_ROOT}
- "if [ ! -f .terraform.key ]; then ssh-keygen -t ed25519 -f .terraform.key -N ''; fi"
- gitlab-terraform init
- gitlab-terraform destroy
dependencies:
- terraform_apply