Skip to content

Commit 6689ae1

Browse files
committed
Increased resilience and logging in build host setup scripts in case of failure
Ticket: none Changelog: none
1 parent e97e00d commit 6689ae1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ci/setup-cfengine-build-host.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function cleanup()
9090
fi
9191
ls -l /home
9292
chown -R jenkins /home/jenkins
93+
echo "Done with cleanup()"
9394
}
9495

9596
trap cleanup ERR
@@ -190,7 +191,7 @@ if ! /var/cfengine/bin/cf-agent -V; then
190191
pip install cf-remote
191192
fi
192193
if command -v cf-remote >/dev/null; then
193-
cf-remote --version master install --clients localhost
194+
cf-remote --log-level info --version master install --clients localhost || true
194195
fi
195196
fi
196197

@@ -227,6 +228,8 @@ cp -a masterfiles/* /var/cfengine/inputs/
227228
grep -i error: promises.log && exit 1
228229
/var/cfengine/bin/cf-agent -KIf "$policy" -b cfengine_build_host_setup | tee -a promises.log
229230
grep -i error: promises.log && exit 1
231+
echo "Done evaluating policy. End of promies.log:"
232+
tail promises.log
230233
)
231234

232235
cleanup

0 commit comments

Comments
 (0)