Commit cdf5c253 authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

ci: gitlab-ci with includes

parent 125ca299711e
Pipeline #55550 waiting for manual action with stages
in 2 minutes and 13 seconds
---
default:
image: python
# avoid running duplicate pipelines for both topic head and MR
# see: https://docs.gitlab.com/ee/ci/yaml/#switch-between-branch-pipelines-and-merge-request-pipelines
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_REF_NAME =~ /^topic\/.*/ && $CI_OPEN_MERGE_REQUESTS'
when: never
- when: always
image: python:3.7
include:
# uncomment and uses to customize/extend the configuration here if needed
# (it needs to be at the same level than "- project")
# - ".gitlab-ci-extended.yml"
- project: "open-source/gitlab-ci-templates"
ref: "branch/default"
file:
- "templates/no-duplicated-ci-pipelines.yml" # use workflow to avoid duplicated pipelines
- "templates/lint/flake8.yml" # will do the equivalent of 'tox -e flake8'
- "templates/lint/check-manifest.yml" # will do the equivalent of 'tox -e check-manifest'
- "templates/lint/yamllint.yml" # will do the equivalent of 'tox -e yamllint'
- "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3'
- "templates/build-debian-package.yml" # will build a .deb and upload it to heptapod files
- "templates/create-release-on-heptapod-including-debian-package.yml" # this will create a release on heptapod AND uses uploaded .deb by build-debian-package
- "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi
stages:
- lint
- tests
- after-tests
before_script:
- pip install tox
flake8:
stage: lint
script: tox -e flake8
check-manifest:
stage: lint
script: tox -e check-manifest
black:
stage: lint
script: tox -e black
yamllint:
rules:
- changes:
- "**/*.yaml"
- "**/*.yml"
stage: lint
before_script:
- pip install tox
script:
- tox -e yamllint
# If you have mypy set up
# mypy:
# stage: lint
# script: tox -e mypy
py3:
stage: tests
script: tox -e py3
# If you have your project on readthedocs, you can automatically trigger its
# build by setting:
# - READTHEDOCS_TOKEN
# - READTHEDOCS_ID
# in your heptapod project Settings > CI/CD > Variables.
# You can find those secrets by creating a new integration in your readthedocs
# project here: https://readthedocs.org/dashboard/cubicweb_prometheus/integrations/
#
# Related documentation:
# https://docs.readthedocs.io/en/latest/webhooks.html#using-the-generic-api-integration
#
# trigger-readthedocs:
# only:
# refs:
# - branch/default
# stage: after-tests
# script:
# # regarding the " everywhere when there is a '%': yaml is extremly weird when % are involved
# - curl -X POST -d "token=${READTHEDOCS_TOKEN}" https://readthedocs.org/api/v2/webhook/cubicweb_prometheus/${READTHEDOCS_ID} -w "\nhttp code:"\ "%{http_code}\n" -f
- build-debian-package
- upload-deb-to-heptapod
- release
- publish
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment