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
Viewing commit e6efd82e
Show latest version
1 file
+ 12
8
Preferences
Compare changes
+ 12
8
@@ -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,6 +75,8 @@ 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:
@@ -95,9 +97,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
@@ -110,6 +112,8 @@ 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