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

gitLab CI: can't use after_script for releasing IP - the environment vanishes there

parent 8d99403b
No related branches found
No related tags found
No related merge requests found
Pipeline #2266 failed
......@@ -45,8 +45,6 @@ test-single:
# 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
cache:
when: always
key: single
......@@ -59,6 +57,7 @@ test-single:
- ssh-add ./ssh-key.terra1.txt
- ssh -o PreferredAuthentications=publickey deployadm@$ip "sudo -u debian sh -c 'cd; ~deployadm/terraform/image/tests/run-tests.sh'"
- terraform destroy $args
- openstack floating ip delete $ip
rules:
- if: '$JOB =~ /all|test-single/'
artifacts: &artifacts
......@@ -69,7 +68,6 @@ test-cluster:
stage: test
variables: *tfvars
before_script: *before
after_script: *after
cache:
when: always
key: cluster
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment