Adds conditional skip excludes in containers build for rocky

The excludes list is needed for f28 containers build. For the
rocky periodic we need to skip it as there is no such parameter
in the container build there.

Instead uses sed to remove excludes from containers list.
Once we cherrypick that [1] we can remove sed and use --excludes.

Test runs in [2]

[1] https://review.openstack.org/#/q/topic:cherrypick-excludes-containers-build
[2] https://review.rdoproject.org/r/#/c/19533/
Co-Authored-By: Sagi Shnaidman <sshnaidm@redhat.com>
Change-Id: I668a8557165972324e11707c2f3f32199658b6b9
This commit is contained in:
Marios Andreou 2019-03-20 18:46:10 +02:00
parent dd0415df01
commit 92384cd10d
2 changed files with 10 additions and 0 deletions

View File

@ -2,12 +2,20 @@
source {{ workspace }}/venv/bin/activate
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
{% if zuul.branch == 'stable/rocky' %}
{% for item in exclude_containers['rocky'] %}
sed -i "/{{ item }}/,+1 d" $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml
{% endfor %}
{% endif %}
openstack overcloud container image build \
--config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml \
--kolla-config-file {{ workspace }}/kolla-build.conf \
{% if zuul.branch != 'stable/rocky' %}
{% for item in exclude_containers[ansible_pkg_mgr] %}
--exclude {{ item }} \
{% endfor %}
{% endif %}
{% if use_buildah is defined and use_buildah %}
--use-buildah \
{% endif %}

View File

@ -18,6 +18,8 @@ exclude_containers:
- sensu-base
yum:
- opendaylight
rocky:
- grafana
timestamper_cmd: >-
| awk '{ print strftime("%Y-%m-%d %H:%M:%S |"), $0; fflush(); }'