CI: Fix tag suffix logic for CentOS 8

On CentOS, ansible_distribution is 'CentOS' rather than 'centos'.
Our logic when setting the image tag for publisher jobs is incorrect,
meaning that the centos8 publisher publishes images as 'master'
rather than 'master-centos8'. Since this job only has two images it
is likely to complete before the CentOS 7 publisher, so hopefully
images will not be broken for long.

This change fixes the issue by using a case-insensitive comparison.

Change-Id: I66c93e07fe5c6c143e9cf65c6451e573bbfc51d8
Partially-Implements: blueprint centos-rhel-8
This commit is contained in:
Mark Goddard 2020-01-30 12:19:13 +00:00
parent 8be020e1f1
commit cde5405b90
1 changed files with 1 additions and 1 deletions

View File

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