mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-05 00:59:15 +00:00
36 lines
772 B
YAML
36 lines
772 B
YAML
include:
|
|
- project: 'famedly/infra/templates/ci-cd'
|
|
ref: 'ansible-v2'
|
|
file: '/ansible.yml'
|
|
|
|
stages:
|
|
- test
|
|
- build
|
|
- publish
|
|
|
|
black:
|
|
stage: test
|
|
image: registry.gitlab.com/pipeline-components/black:latest
|
|
script:
|
|
- black --check --verbose -- plugins
|
|
|
|
build:
|
|
image: docker.io/alpine
|
|
stage: build
|
|
before_script:
|
|
- apk add --no-cache ansible
|
|
script:
|
|
- ansible-galaxy collection build
|
|
artifacts:
|
|
paths:
|
|
- famedly-matrix-*.tar.gz
|
|
|
|
publish:
|
|
image: docker.io/alpine
|
|
stage: publish
|
|
before_script:
|
|
- apk add --no-cache ansible
|
|
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+$/'
|