Merge "Fail container job if command failed"
This commit is contained in:
commit
dd0415df01
|
@ -17,6 +17,7 @@
|
|||
|
||||
mv *.conf {{ workspace }}/conf/
|
||||
mv *.log {{ workspace }}/logs/
|
||||
mv *.sh {{ workspace }}/logs/
|
||||
mv /tmp/kolla-* {{ workspace }}/logs/buildah-builds/ || true
|
||||
rsync -var --no-links /var/log/ {{ workspace }}/logs/system/ || true
|
||||
rsync -var --no-links /etc/docker/ {{ workspace }}/etc/docker/ || true
|
||||
|
|
|
@ -62,26 +62,17 @@
|
|||
mode: 0644
|
||||
force: yes
|
||||
|
||||
- name: Generate building script
|
||||
template:
|
||||
src: templates/build.sh.j2
|
||||
dest: "{{ workspace }}/build_containers.sh"
|
||||
mode: 0777
|
||||
force: yes
|
||||
|
||||
- name: Run image build
|
||||
args:
|
||||
chdir: '{{ workspace }}'
|
||||
shell: |
|
||||
set -o pipefail
|
||||
source {{ workspace }}/venv/bin/activate
|
||||
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
|
||||
|
||||
openstack overcloud container image build \
|
||||
--config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml \
|
||||
--kolla-config-file {{ workspace }}/kolla-build.conf \
|
||||
{% for item in exclude_containers[ansible_pkg_mgr] %}
|
||||
--exclude {{ item }} \
|
||||
{% endfor %}
|
||||
{% if use_buildah is defined and use_buildah %}
|
||||
--use-buildah \
|
||||
{% endif %}
|
||||
2>&1 {{ timestamper_cmd }} > {{ workspace }}/build.log
|
||||
RESULT=$?
|
||||
exit $RESULT
|
||||
shell: set -o pipefail && bash build_containers.sh 2>&1 {{ timestamper_cmd }} > {{ workspace }}/build.log
|
||||
|
||||
- name: Retrieve the images by version_hash and retag with tripleo-ci-testing if periodic
|
||||
when:
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash -eux
|
||||
source {{ workspace }}/venv/bin/activate
|
||||
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
|
||||
|
||||
openstack overcloud container image build \
|
||||
--config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml \
|
||||
--kolla-config-file {{ workspace }}/kolla-build.conf \
|
||||
{% for item in exclude_containers[ansible_pkg_mgr] %}
|
||||
--exclude {{ item }} \
|
||||
{% endfor %}
|
||||
{% if use_buildah is defined and use_buildah %}
|
||||
--use-buildah \
|
||||
{% endif %}
|
Loading…
Reference in New Issue