Change the pipeline of releasing to tag pipeline

Because zuul pre-release pipeline is pep400 compliant, but no
semver compliant, we can't push pre-release tags. Galaxy expects
from tags to be pure semver (not pep440).
Change the pipeline to be 'tag' and be triggered by any tag.

Change-Id: Ia288452668179723e35452d6e9579fb1dd0c4c3a
This commit is contained in:
Sagi Shnaidman
2021-07-28 18:14:27 +03:00
parent 5ef192f1f2
commit c05b1fdbaf
2 changed files with 15 additions and 1 deletions

View File

@@ -453,6 +453,6 @@
- ansible-collections-openstack-functional-devstack-rocky-ansible-2.11
- ansible-collections-openstack-functional-devstack-queens-ansible-devel
pre-release:
tag:
jobs:
- ansible-collections-openstack-release

View File

@@ -24,6 +24,20 @@
msg: "No tag was found in Zuul vars!"
when: version_tag == 'no_version'
# Ansible Galaxy can accept only pure semver versions
# see https://semver.org for details
- name: Check that tag is proper semver
debug:
msg: >-
{{ version_tag is version('999.999.999', 'lt', version_type='semver') }}
ignore_errors: true
register: test_semver
- name: Fail if tag is not proper semver
fail:
msg: "Error is: {{ test_semver.msg }}"
when: test_semver is failed
- name: Create a directory for collection
file:
state: "{{ item }}"