CentOS 8: Fix CentOS 7 publisher tag

Currently we use CentOS 8 nodepool images for all CI build jobs. This
means we can't use the ansible_distribution_major_version fact to detect
whether we are building CentOS 7 or 8 images. Due to this, all CentOS
images (including CentOS 7) are currently published with a
'master-centos8' tag.

This change fixes the issue by using the base_tag variable which is
defined for CentOS 8 build jobs.

Change-Id: I29b7b8ee742120107a11bd419ac58ab5c09b0b75
Partially-Implements: blueprint centos-rhel-8
This commit is contained in:
Mark Goddard 2020-02-05 14:20:45 +00:00
parent 49445b68f8
commit 1c31fe9cd6
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ debug = true
{% if publisher %} {% if publisher %}
namespace = kolla namespace = kolla
{# TODO(mgoddard): Remove tag_suffix when CentOS 7 is no longer supported. #} {# TODO(mgoddard): Remove tag_suffix when CentOS 7 is no longer supported. #}
{% set tag_suffix = '-centos8' if ansible_distribution | lower == 'centos' and ansible_distribution_major_version == '8' else '' %} {% set tag_suffix = '-centos8' if ansible_distribution | lower == 'centos' and base_tag | default == 8 else '' %}
tag = {{ (zuul.tag if zuul.pipeline == "release" else zuul.branch | basename) ~ tag_suffix }} tag = {{ (zuul.tag if zuul.pipeline == "release" else zuul.branch | basename) ~ tag_suffix }}
{% endif %} {% endif %}
push = false push = false