Merge "Revert "Explicitly trap on ERR" and fix exit code hanlding"

This commit is contained in:
Zuul 2021-11-22 22:52:22 +00:00 committed by Gerrit Code Review
commit f7a36512a9
3 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,11 @@
- hosts: all
tasks:
- shell:
cmd: bash scripts/test-bifrost.sh 2>&1 | tee "{{ ansible_user_dir }}/bifrost.log"
cmd: |
set -eo pipefail
./scripts/test-bifrost.sh 2>&1 | tee "{{ ansible_user_dir }}/bifrost.log"
chdir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/bifrost'].src_dir }}"
executable: /bin/bash
environment:
BIFROST_TRACE: "true"
BUILD_IMAGE: "{{ build_image | default(false) | bool | lower }}"

View File

@ -82,7 +82,8 @@ sudo journalctl -u uwsgi@keystone-public &> ${LOG_LOCATION}/keystone-public.log
# Copy PXE information
mkdir -p ${LOG_LOCATION}/pxe/
cp /httpboot/ipxe.* ${LOG_LOCATION}/pxe/
ls -lR /httpboot > ${LOG_LOCATION}/pxe/listing.txt
cp -aL /httpboot/*.ipxe ${LOG_LOCATION}/pxe/
cp -aL /httpboot/pxelinux.cfg/ ${LOG_LOCATION}/pxe/
# Copy baremetal information

View File

@ -139,7 +139,6 @@ on_exit() {
$SCRIPT_HOME/collect-test-info.sh
}
trap on_exit EXIT
trap on_exit ERR
# Change working directory
cd $BIFROST_HOME/playbooks