Commit 00f85d2b authored by Laurent Peuch's avatar Laurent Peuch
Browse files

ci: uses gitlab-ci 'rules:'

parent 7d45fdbc428c
Pipeline #33938 passed with stages
in 4 minutes and 39 seconds
......@@ -8,12 +8,11 @@ stages:
- deploy
lint_py:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
only:
changes:
- "**/*.py"
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- "**/*.py"
stage: lint
before_script:
- pip install tox
......@@ -21,9 +20,10 @@ lint_py:
- tox -e flake8
lint_manifest:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- when: always
stage: lint
before_script:
- pip install tox
......@@ -31,12 +31,11 @@ lint_manifest:
- tox -e check-manifest
lint_doc8:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
only:
changes:
- doc/**/*
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- doc/**/*
stage: lint
before_script:
- pip install tox
......@@ -44,15 +43,14 @@ lint_doc8:
- tox -e doc8
lint_yaml:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
only:
changes:
- "**/*.yaml"
- "*.yaml"
- "**/*.yml"
- "*.yml"
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- "**/*.yaml"
- "*.yaml"
- "**/*.yml"
- "*.yml"
stage: lint
before_script:
- pip install tox
......@@ -60,13 +58,12 @@ lint_yaml:
- tox -e yamllint
build_doc:
only:
changes:
- doc/**/*
- "**/*.py"
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- doc/**/*
- "**/*.py"
stage: lint
before_script:
- pip install tox
......@@ -78,9 +75,11 @@ build_doc:
allow_failure: true # XXX fix me
py3_server:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- cubicweb/**/*
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
......@@ -93,17 +92,13 @@ py3_server:
- /builds/cubicweb/cubicweb/server.html
- /builds/cubicweb/cubicweb/py3-server-deprecated-warnings.json
- /reports/coverage-server.xml
only:
changes:
- cubicweb/**/*
py3_web:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
only:
changes:
- cubicweb/**/*
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- cubicweb/**/*
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
......@@ -117,12 +112,11 @@ py3_web:
- /reports/coverage-web.xml
py3_misc:
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
only:
changes:
- cubicweb/**/*
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- changes:
- cubicweb/**/*
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
before_script:
......@@ -136,9 +130,10 @@ py3_misc:
- /reports/coverage-misc.xml
py3-from-forge-server:
only:
changes:
- cubicweb/**/*
rules:
- changes:
- cubicweb/**/*
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
allow_failure: true
......@@ -153,9 +148,10 @@ py3-from-forge-server:
- tox -e py3-from-forge-server
py3-from-forge-web:
only:
changes:
- cubicweb/**/*
rules:
- changes:
- cubicweb/**/*
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
allow_failure: true
......@@ -169,9 +165,10 @@ py3-from-forge-web:
- /builds/cubicweb/cubicweb/py3-from-forge-web-deprecated-warnings.json
py3-from-forge-misc:
only:
changes:
- cubicweb/**/*
rules:
- changes:
- cubicweb/**/*
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
stage: tests
image: r.intra.logilab.fr/jenkins/jnlp:buster
allow_failure: true
......@@ -185,15 +182,13 @@ py3-from-forge-misc:
- /builds/cubicweb/cubicweb/py3-from-forge-misc-deprecated-warnings.json
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
......@@ -202,11 +197,10 @@ trigger-readthedocs:
sonarqube:
stage: qa
image: sonarsource/sonar-scanner-cli
only:
- branch/default
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- if: '$CI_COMMIT_REF_NAME == "branch/default"'
script:
- apk add python3 mercurial
- sonar-scanner
......@@ -221,9 +215,10 @@ sonarqube:
pages:
stage: deploy
except:
variables:
- $TRIGGERED_FROM_OTHER_PROJECT
rules:
- if: '$TRIGGERED_FROM_OTHER_PROJECT'
when: never
- if: '$CI_COMMIT_REF_NAME == "branch/default"'
before_script:
- pip install tox
script:
......@@ -236,5 +231,3 @@ pages:
artifacts:
paths:
- public
only:
- branch/default
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