Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • bio3
  • ci-bullseye
  • feature/certificates2
  • master
  • wip/bigtop-3.0.0
5 results

Target

Select target project
  • 702/HADOOP/terraform
1 result
Select Git revision
  • bio3
  • ci-bullseye
  • feature/certificates2
  • master
  • wip/bigtop-3.0.0
5 results
Show changes
Commits on Source (2)
......@@ -36,28 +36,31 @@ test-single:
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends git
- rm -fv clouds.yaml testsuite.auto.tfvars gitlab.tf
- ln -sfv $CLOUDS_YAML clouds.yaml
- ln -sfv $TERRAFORM_CONFIG testsuite.auto.tfvars
- ln -sfv "$CLOUDS_YAML" clouds.yaml
- ln -sfv "$TERRAFORM_CONFIG" testsuite.auto.tfvars
# GitLab remote terraform state
- 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`
- if test -f ip.txt; then ip=$(cat ip.txt); openstack floating ip show "$ip" >/dev/null || ip=''; fi
- if test -z "$ip"; then ip=$(openstack floating ip create -c floating_ip_address -f value public-muni-147-251-21-GROUP); echo "$ip" > ip.txt; fi
cache:
when: always
key: single
paths:
- ".terraform/"
- "ip.txt"
script:
- 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
- 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)
- 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
- 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"
- rm -fv ip.txt
rules:
- if: '$JOB =~ /all|test-single/'
artifacts: &artifacts
......@@ -73,14 +76,16 @@ test-cluster:
key: cluster
paths:
- ".terraform/"
- "ip.txt"
script:
- 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
- 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)
- ssh-add ./ssh-key.terra2.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
- 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"
- rm -fv ip.txt
rules:
- if: '$JOB =~ /all|test-cluster/'
artifacts: *artifacts
......