From c05b1fdbaf361eec92688e7d58b513cac53446cf Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Wed, 28 Jul 2021 18:14:27 +0300 Subject: [PATCH] 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 --- .zuul.yaml | 2 +- ci/publish/publish_collection.yml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index 391df54b..124841f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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 diff --git a/ci/publish/publish_collection.yml b/ci/publish/publish_collection.yml index 4b74f953..809c2d8f 100644 --- a/ci/publish/publish_collection.yml +++ b/ci/publish/publish_collection.yml @@ -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 }}"