Skip to content

Commit bf274e8

Browse files
eggmastergerritforge-ltd
authored andcommitted
some playbooks should not run when there is a failure in a previous playbook
Adds conditional logic to some of the cicentos job builders so that they only run fencing and test if previous plays passed. Change-Id: I4559517fb65e39d55a1b89312d0c97cb271fe013
1 parent 142297b commit bf274e8

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

jenkins-jobs/builders.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,15 @@
6363
6464
$anscmd -i local_hosts playbooks/full-job-no-test.yml
6565
result=$?
66+
if [[ "$result" = "0" ]]; then
67+
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-virt-fencing.yml
68+
result=$?
69+
fi
6670
67-
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-virt-fencing.yml
68-
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-test.yml
71+
if [[ "$result" = "0" ]]; then
72+
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-test.yml
73+
result=$?
74+
fi
6975
7076
infra_result=0
7177
$anscmd -i hosts playbooks/collect_logs.yml &> collect_logs.txt || infra_result=1
@@ -150,8 +156,15 @@
150156
$anscmd -i local_hosts playbooks/full-job-no-test.yml
151157
result=$?
152158
153-
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-virt-fencing.yml
154-
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-test.yml
159+
if [[ "$result" = "0" ]]; then
160+
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-virt-fencing.yml
161+
result=$?
162+
fi
163+
164+
if [[ "$result" = "0" ]]; then
165+
$anscmd -i hosts playbooks/post-deploy/rdo-manager/overcloud-test.yml
166+
result=$?
167+
fi
155168
156169
pip install shyaml > shyaml_build.log
157170
if [[ ` shyaml get-value installer.undercloud_image < ksgen_settings.yml` == 'save' ]]; then

0 commit comments

Comments
 (0)