ansible-collection-famedly-.../.gitlab-ci.yml
2022-06-21 11:08:26 +02:00

36 lines
725 B
YAML

include:
- project: 'famedly/company/devops/templates/ci-cd'
ref: 'ansible-v1'
file: '/ansible.yml'
stages:
- test
- build
- publish
# Debian Stable
test-3.9:
variables: { PYTHON_VERSION: "3.9" }
extends: .ansible-test
# Latest stable Python
test-3.10:
variables: { PYTHON_VERSION: "3.10" }
extends: .ansible-test
build:
extends: .ansible
stage: build
script:
- ansible-galaxy collection build
artifacts:
paths:
- famedly-matrix-*.tar.gz
publish:
extends: .ansible
stage: publish
script:
- ansible-galaxy collection publish ./famedly-matrix-*.tar.gz --api-key ${ANSIBLE_GALAXY_API_TOKEN}
rules:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/'