From fcad1cc0e00852879f21b30f4be7dd22095fb57a Mon Sep 17 00:00:00 2001 From: Ronelle Landy Date: Wed, 20 Dec 2017 10:30:27 -0500 Subject: [PATCH] Fix reproducer script path references for all environments The reproducer script was initially tested on RDO Cloud. Upstream jobs produce variables with slightly different path references. This review fixes those path variables for use on all environments. Change-Id: I7ab9b2a9bbb9971ec4814a045023be67fadbcac2 --- roles/create-reproducer-script/tasks/main.yml | 2 +- .../templates/reproducer-quickstart.sh.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/create-reproducer-script/tasks/main.yml b/roles/create-reproducer-script/tasks/main.yml index 7b0a22896..b7471e236 100644 --- a/roles/create-reproducer-script/tasks/main.yml +++ b/roles/create-reproducer-script/tasks/main.yml @@ -2,7 +2,7 @@ - name: Set fact for environment variables set_fact: zuul_changes: "{{ lookup('env', 'ZUUL_CHANGES') }}" - nodes_config: "{{ lookup('env', 'NODES_FILE') }}" + nodes_config: "{{ lookup('env', 'NODES_FILE') | regex_replace('^.*/tripleo-quickstart','') }}" toci_jobtype: "{{ lookup('env', 'TOCI_JOBTYPE') }}" - name: Set fact for stable branch diff --git a/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 b/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 index ba0edbc0d..4f345b213 100644 --- a/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 +++ b/roles/create-reproducer-script/templates/reproducer-quickstart.sh.j2 @@ -135,7 +135,7 @@ export ANSIBLE_ROLES_PATH=$ANSIBLE_ROLES_PATH:$WORKSPACE/tripleo-quickstart/role export NODES_FILE="{{ nodes_config }}" {% if 'ovb' in toci_jobtype %} -ansible-playbook tripleo-quickstart-extras/playbooks/ovb-create-stack.yml \ +ansible-playbook $WORKSPACE/tripleo-quickstart-extras/playbooks/ovb-create-stack.yml \ -e local_working_dir=$WORKSPACE \ -e virthost=localhost \ -e @$WORKSPACE/tripleo-quickstart-extras/config/environments/rdocloud.yml \ @@ -161,7 +161,7 @@ else SUBNODE_COUNT=$(( $( awk '/node_count: / {print $2}' $WORKSPACE/tripleo-quickstart/$NODES_FILE ) +1 )) fi -ansible-playbook tripleo-quickstart-extras/playbooks/provision_multinodes.yml \ +ansible-playbook $WORKSPACE/tripleo-quickstart-extras/playbooks/provision_multinodes.yml \ -e local_working_dir=$WORKSPACE \ -e subnode_count=$SUBNODE_COUNT \ -e prefix=$NODESTACK_PREFIX