mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
CI: fix terraform
- add default testcase - fix ansible ssh connection
This commit is contained in:
@@ -49,6 +49,8 @@ terraform_validate:
|
|||||||
only: [/^pr-.*$/]
|
only: [/^pr-.*$/]
|
||||||
variables:
|
variables:
|
||||||
ANSIBLE_INVENTORY_UNPARSED_FAILED: "true"
|
ANSIBLE_INVENTORY_UNPARSED_FAILED: "true"
|
||||||
|
ANSIBLE_REMOTE_USER: ubuntu # the openstack terraform module does not handle custom user correctly
|
||||||
|
ANSIBLE_SSH_RETRIES: 15
|
||||||
TF_VAR_ssh_user: $ANSIBLE_REMOTE_USER
|
TF_VAR_ssh_user: $ANSIBLE_REMOTE_USER
|
||||||
TF_VAR_cluster_name: $CI_JOB_ID
|
TF_VAR_cluster_name: $CI_JOB_ID
|
||||||
script:
|
script:
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
|
if [[ -v TESTCASE ]]; then
|
||||||
|
TESTCASE_FILE=files/${TESTCASE}.yml
|
||||||
|
else
|
||||||
|
TESTCASE_FILE=common_vars.yml
|
||||||
|
TESTCASE=default
|
||||||
|
fi
|
||||||
|
|
||||||
echo "TESTCASE is $TESTCASE"
|
echo "TESTCASE is $TESTCASE"
|
||||||
|
|
||||||
source tests/files/$TESTCASE || true
|
source tests/files/$TESTCASE || true
|
||||||
@@ -56,7 +63,7 @@ playbook=$1
|
|||||||
shift
|
shift
|
||||||
ansible-playbook \
|
ansible-playbook \
|
||||||
-e @tests/common_vars.yml \
|
-e @tests/common_vars.yml \
|
||||||
-e @tests/files/${TESTCASE}.yml \
|
-e @tests/${TESTCASE_FILE} \
|
||||||
-e local_release_dir=${PWD}/downloads \
|
-e local_release_dir=${PWD}/downloads \
|
||||||
"$@" \
|
"$@" \
|
||||||
${playbook}
|
${playbook}
|
||||||
|
|||||||
Reference in New Issue
Block a user