Skip to content
Snippets Groups Projects
Commit 8d99403b authored by František Dvořák's avatar František Dvořák
Browse files

gitLab CI: init terraform before allocating IP

parent f6d7cc9e
No related branches found
No related tags found
No related merge requests found
Pipeline #818 passed
......@@ -42,6 +42,8 @@ test-single:
- printf 'terraform {\n backend "http" {\n }\n}\n' > gitlab.tf
# https://github.com/terraform-provider-openstack/terraform-provider-openstack/issues/1160
- touch ./secure.yml
# better to init terraform before allocating public floating IP address (the state could be locked)
- terraform init -input=false
- ip=`openstack floating ip create -c floating_ip_address -f value public-muni-147-251-21-GROUP`
after_script: &after
- openstack floating ip delete $ip
......@@ -51,7 +53,6 @@ test-single:
paths:
- ".terraform/"
script:
- terraform init -input=false
- args="-auto-approve -var type=hadoop-single -var flavor=standard.large -var n=0 -var domain=terra1 -var image_name=$IMAGE_NAME -var image_visibility=$IMAGE_VISIBILITY -var floating_ip=$ip"
- terraform apply $args
- eval $(ssh-agent -s)
......@@ -75,7 +76,6 @@ test-cluster:
paths:
- ".terraform/"
script:
- terraform init -input=false
- args="-auto-approve -var type=hadoop -var domain=terra2 -var image_name=$IMAGE_NAME -var image_visibility=$IMAGE_VISIBILITY -var floating_ip=$ip"
- terraform apply $args
- eval $(ssh-agent -s)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment