tripleo-ci/roles/build-containers/templates/kolla-build.sh.j2
Marios Andreou 800d36d83f Cleanup code from old releases already EOL pike|queens|rocky|stein
In [1] we removed the related jobs for these EOL releases. Here
we deal with removing code related to these branches including
any conditionals or special cases from emit releases and the
build-containers and run-test roles. Also removes some really
old references to newton.

[1] https://review.opendev.org/c/openstack/tripleo-ci/+/838110

Change-Id: I184cd525a8696b0b634ac8d6f895ab642ac5aa33
2022-04-20 13:47:27 +03:00

30 lines
1.2 KiB
Django/Jinja

#!/bin/bash -eux
{% if buildcontainers_venv is defined and buildcontainers_venv %}
source {{ workspace }}/venv_build/bin/activate
pip install -U decorator
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common"
{% else %}
TRIPLEO_COMMON_PATH="/usr/share/openstack-tripleo-common"
{% endif %}
TRIPLEO_CI_PATH="{{ ansible_user_dir }}/src/opendev.org/openstack/tripleo-ci"
### build
openstack overcloud container image build {{ container_config }}\
{% if ci_branch in exclude_containers %}
{% for item in exclude_containers[ci_branch][container_exclude_distro] %}
--exclude {{ item }} \
{% endfor %}
{% endif %}
{% if use_buildah is defined and use_buildah %}
--use-buildah \
{% endif %}
--work-dir {{ ansible_user_dir }}/container-builds \
{% if build_timeout is defined %}
--build-timeout {{ build_timeout }} \
{% endif %}
--kolla-config-file {{ workspace }}/kolla-build.conf
### grep errors in all build logs
sudo egrep "^Error:|No match" /tmp/kolla-*/docker -R > containers-build-errors.log 2>&1 || true
sudo egrep "^Error:|No match" /tmp/container-builds/*/docker -R >> containers-build-errors.log 2>&1 || true