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 }}"