From 7c0d3575c10d6425612b3c7d10b8da4c62938de2 Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Wed, 20 Dec 2017 14:22:47 -0500 Subject: 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. --- test/ci/install.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 test/ci/install.sh (limited to 'test/ci/install.sh') 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 -- cgit v1.2.3