diff --git a/jobs/templates/swh-pipeline.yaml b/jobs/templates/swh-pipeline.yaml index 651f5ec..bf7c2b0 100644 --- a/jobs/templates/swh-pipeline.yaml +++ b/jobs/templates/swh-pipeline.yaml @@ -1,78 +1,78 @@ - job-template: name: "{name}/tests" project-type: pipeline sandbox: true numToKeep: 20 dsl: | pipeline {{ - agent {{ label 'swh-tox' }} - - stages {{ - stage('Checkout') {{ - steps {{ - git url: 'https://forge.softwareheritage.org/source/{display-name}.git' - }} + agent {{ label 'swh-tox' }} + parameters {{ + gitParameter name: 'REVISION', + type: 'PT_REVISION', + defaultValue: 'master' + string name: 'PHID', + description: 'PHID of the Phabricator target object on which results will be reported.' }} stage('Static analysis') {{ steps {{ echo "flake8" sh '''python3 -m flake8''' echo "radon" sh ''' mkdir -p reports python3 -m pip install --user --upgrade https://github.com/douardda/radon/archive/main-module.zip python3 -m radon raw --json swh/ > reports/raw_report.json python3 -m radon cc --json swh/ > reports/cc_report.json python3 -m radon mi --json swh/ > reports/mi_report.json python3 -m radon hal --json swh/ > reports/hal_report.json python3 -m radon cc --xml swh/ > reports/cc_report.xml ''' }} }} stage('Unit tests') {{ steps {{ sh ''' cat >tox4jenkins.ini <