Commit c80caa7a authored by Laurent Peuch's avatar Laurent Peuch
Browse files

ci: backport rules because only/except is broken

--HG--
branch : 3.28
parent 5b4881f1ad1c
image: python:latest
# avoid duplicated pipelines
# 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\/.*/'
when: never
- when: always
stages:
- lint
- tests
- after-tests
lint_py:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- "**/*.py"
stage: lint
before_script:
- pip install tox
script:
- tox -e flake8
only:
changes:
- "*.py"
lint_manifest:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- when: on_success
stage: lint
before_script:
- pip install tox
......@@ -29,74 +38,84 @@ lint_manifest:
- tox -e check-manifest
lint_doc8:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- doc/**/*
stage: lint
before_script:
- pip install tox
script:
- tox -e doc8
only:
changes:
- doc/**/*
lint_doc:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- doc/**/*
- "**/*.py"
stage: lint
before_script:
- pip install tox
script:
- tox -e doc
allow_failure: true # XXX fix me
only:
changes:
- doc/**/*
- "*.py"
py3_server:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- cubicweb/**/*
- "*.py" # setup.py
- requirements/dev.txt
- requirements/test-server.txt
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
script:
- tox -e py3-server
only:
changes:
- cubicweb/**/*
py3_web:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- cubicweb/**/*
- "*.py" # setup.py
- requirements/dev.txt
- requirements/test-web.txt
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
- sudo apt update && sudo apt install -y firefox-esr
script:
- tox -e py3-web
only:
changes:
- cubicweb/**/*
py3_misc:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- cubicweb/**/*
- "*.py" # setup.py
- requirements/dev.txt
- requirements/test-misc.txt
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
- sudo apt update && sudo apt install -y firefox-esr
script:
- tox -e py3-misc
only:
changes:
- cubicweb/**/*
py3-from-forge:
rules:
- changes:
- cubicweb/**/*
- "*.py" # setup.py
- requirements/*
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
allow_failure: true
......@@ -104,21 +123,16 @@ py3-from-forge:
- pip install tox
script:
- tox -e py3-from-forge
only:
changes:
- cubicweb/**/*
trigger-readthedocs:
only:
refs:
- branch/default
changes:
- cubicweb/**/*
- doc/**/*
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- if: '$CI_COMMIT_REF_NAME == "branch/default"'
changes:
- cubicweb/**/*
- doc/**/*
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/33537/ -w "\nhttp code:"\ "%{http_code}\n" -f
# 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/33537/ -w "\nhttp code:"\ "%{http_code}\n" -f
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