summaryrefslogtreecommitdiffstats
path: root/test/ci/install.sh
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-12-20 14:22:47 -0500
committerMichael Gugino <mgugino@redhat.com>2018-01-03 09:45:58 -0500
commit7c0d3575c10d6425612b3c7d10b8da4c62938de2 (patch)
tree0d385ce72e6198b105edd86e6ce2ac77e904de3b /test/ci/install.sh
parenta5de165b8e7113631a30ef0e4a20b5f74db073f0 (diff)
downloadopenshift-7c0d3575c10d6425612b3c7d10b8da4c62938de2.tar.gz
openshift-7c0d3575c10d6425612b3c7d10b8da4c62938de2.tar.bz2
openshift-7c0d3575c10d6425612b3c7d10b8da4c62938de2.tar.xz
openshift-7c0d3575c10d6425612b3c7d10b8da4c62938de2.zip
Add in-tree CI scripts
Currently, the scripts that contain testing inventory and actually execute the running of openshift-ansible plays are kept in the CI jobs themselves. This commit adds scripts into our tree so we can have better control over variables, differences between branches, and more transparency to end users for how we run our integration tests.
Diffstat (limited to 'test/ci/install.sh')
-rwxr-xr-xtest/ci/install.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/ci/install.sh b/test/ci/install.sh
new file mode 100755
index 000000000..7172a6765
--- /dev/null
+++ b/test/ci/install.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+set -x
+
+# Argument 1: path to openshift-ansible/playbooks
+# Argument 2: inventory path
+# Argument 3: Extra vars path
+
+echo "Running prerequisites"
+
+ansible-playbook -vv \
+ --inventory $2 \
+ --e @$3 \
+ $1/prerequisites.yml
+
+echo "Running network_manager setup"
+
+playbook_base='/usr/share/ansible/openshift-ansible/playbooks/'
+if [[ -s "$1/openshift-node/network_manager.yml" ]]; then
+ playbook="$1/openshift-node/network_manager.yml"
+else
+ playbook="$1/byo/openshift-node/network_manager.yml"
+fi
+ansible-playbook -vv \
+ --inventory $1 \
+ --e @$2 \
+ ${playbook}
+
+echo "Running openshift-ansible deploy_cluster"
+
+ansible-playbook -vv \
+ --inventory $2 \
+ --e @$3 \
+ $1/deploy_cluster.yml