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: ...@@ -36,28 +36,31 @@ test-single:
- sudo apt-get update - sudo apt-get update
- sudo apt-get install -y --no-install-recommends git - sudo apt-get install -y --no-install-recommends git
- rm -fv clouds.yaml testsuite.auto.tfvars gitlab.tf - rm -fv clouds.yaml testsuite.auto.tfvars gitlab.tf
- ln -sfv $CLOUDS_YAML clouds.yaml - ln -sfv "$CLOUDS_YAML" clouds.yaml
- ln -sfv $TERRAFORM_CONFIG testsuite.auto.tfvars - ln -sfv "$TERRAFORM_CONFIG" testsuite.auto.tfvars
# GitLab remote terraform state # GitLab remote terraform state
- printf 'terraform {\n backend "http" {\n }\n}\n' > gitlab.tf - printf 'terraform {\n backend "http" {\n }\n}\n' > gitlab.tf
# https://github.com/terraform-provider-openstack/terraform-provider-openstack/issues/1160 # https://github.com/terraform-provider-openstack/terraform-provider-openstack/issues/1160
- touch ./secure.yml - touch ./secure.yml
# better to init terraform before allocating public floating IP address (the state could be locked) # better to init terraform before allocating public floating IP address (the state could be locked)
- terraform init -input=false - 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: cache:
when: always when: always
key: single key: single
paths: paths:
- ".terraform/" - ".terraform/"
- "ip.txt"
script: 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" - 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 - terraform apply "${args[@]}"
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- ssh-add ./ssh-key.terra1.txt - 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'" - ssh -o PreferredAuthentications=publickey "deployadm@$ip" "sudo -u debian sh -c 'cd; ~deployadm/terraform/image/tests/run-tests.sh'"
- terraform destroy $args - terraform destroy "${args[@]}"
- openstack floating ip delete $ip - openstack floating ip delete "$ip"
- rm -fv ip.txt
rules: rules:
- if: '$JOB =~ /all|test-single/' - if: '$JOB =~ /all|test-single/'
artifacts: &artifacts artifacts: &artifacts
...@@ -73,14 +76,16 @@ test-cluster: ...@@ -73,14 +76,16 @@ test-cluster:
key: cluster key: cluster
paths: paths:
- ".terraform/" - ".terraform/"
- "ip.txt"
script: script:
- args="-auto-approve -var type=hadoop -var domain=terra2 -var image_name=$IMAGE_NAME -var image_visibility=$IMAGE_VISIBILITY -var floating_ip=$ip" - 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 - terraform apply "${args[@]}"
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- ssh-add ./ssh-key.terra2.txt - 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'" - ssh -o PreferredAuthentications=publickey "deployadm@$ip" "sudo -u debian sh -c 'cd; ~deployadm/terraform/image/tests/run-tests.sh'"
- terraform destroy $args - terraform destroy "${args[@]}"
- openstack floating ip delete $ip - openstack floating ip delete "$ip"
- rm -fv ip.txt
rules: rules:
- if: '$JOB =~ /all|test-cluster/' - if: '$JOB =~ /all|test-cluster/'
artifacts: *artifacts artifacts: *artifacts
......