diff --git a/jobs/swh/core.yaml b/jobs/swh/core.yaml index 48a5e8e..50a8392 100644 --- a/jobs/swh/core.yaml +++ b/jobs/swh/core.yaml @@ -1,7 +1,9 @@ - project: - name: core + name: DCORE + display-name: swh-core pkg: core jobs: - - swh-{name} - - swh-{name}/tests - - swh-{name}/build + - "{name}" + - "{name}/tests" + - "{name}/build" + - "{name}/tox" diff --git a/jobs/swh/loader-mercurial.yaml b/jobs/swh/loader-mercurial.yaml index 37d668e..61c94ee 100644 --- a/jobs/swh/loader-mercurial.yaml +++ b/jobs/swh/loader-mercurial.yaml @@ -1,6 +1,9 @@ - project: - name: loader-mercurial + name: DLDHG + display-name: loader-mercurial + pkg: loader.mercurial jobs: - - swh-{name} - - swh-{name}/tests - - swh-{name}/build + - "{name}" + - "{name}/tests" + - "{name}/build" + - "{name}/tox" diff --git a/jobs/swh/model.yaml b/jobs/swh/model.yaml index 026dc00..a63b0c2 100644 --- a/jobs/swh/model.yaml +++ b/jobs/swh/model.yaml @@ -1,7 +1,9 @@ - project: - name: model + name: DMOD + display-name: swh-model pkg: model jobs: - - swh-{name} - - swh-{name}/tests - - swh-{name}/build + - "{name}" + - "{name}/tests" + - "{name}/build" + - "{name}/tox" diff --git a/jobs/swh/objstorage.yaml b/jobs/swh/objstorage.yaml index eb7fb14..984bdf5 100644 --- a/jobs/swh/objstorage.yaml +++ b/jobs/swh/objstorage.yaml @@ -1,7 +1,9 @@ - project: - name: objstorage + name: DOBJS + display-name: swh-objstorage pkg: objstorage jobs: - - swh-{name} - - swh-{name}/tests - - swh-{name}/build + - "{name}" + - "{name}/tests" + - "{name}/build" + - "{name}/tox" diff --git a/jobs/swh/sandbox.yaml b/jobs/swh/sandbox.yaml index 165d77c..14c3484 100644 --- a/jobs/swh/sandbox.yaml +++ b/jobs/swh/sandbox.yaml @@ -1,6 +1,7 @@ - project: - name: sandbox + name: TSBX + display-name: swh-sandbox pkg: sandbox jobs: - - swh-{name} - - swh-{name}/tox + - "{name}" + - "{name}/tox" diff --git a/jobs/swh/scheduler.yaml b/jobs/swh/scheduler.yaml index 0a6158d..3f4cedf 100644 --- a/jobs/swh/scheduler.yaml +++ b/jobs/swh/scheduler.yaml @@ -1,7 +1,9 @@ - project: - name: scheduler + name: DSCH + display-name: swh-scheduler pkg: scheduler jobs: - - swh-{name} - - swh-{name}/tests - - swh-{name}/build + - "{name}" + - "{name}/tests" + - "{name}/build" + - "{name}/tox" diff --git a/jobs/swh/storage.yaml b/jobs/swh/storage.yaml index 381f9c0..9de6bb4 100644 --- a/jobs/swh/storage.yaml +++ b/jobs/swh/storage.yaml @@ -1,7 +1,9 @@ - project: - name: storage + name: DSTO + display-name: swh-storage pkg: storage jobs: - - swh-{name} - - swh-{name}/tests - - swh-{name}/build + - "{name}" + - "{name}/tests" + - "{name}/build" + - "{name}/tox" diff --git a/jobs/templates/swh-build.yaml b/jobs/templates/swh-build.yaml index 39569ad..13e32dd 100644 --- a/jobs/templates/swh-build.yaml +++ b/jobs/templates/swh-build.yaml @@ -1,30 +1,30 @@ - job-template: - name: swh-{name}/build + name: "{name}/build" node: swh-tox parameters: - string: name: BRANCH default: '{branch|master}' scm: - git: refspec: 'refs/heads/{branch|master}' url: https://forge.softwareheritage.org/source/swh-{name}.git numToKeep: 20 triggers: - pollscm: cron: "H */3 * * *" wrappers: - timestamps builders: - shell: python3 setup.py sdist bdist_wheel publishers: - archive: artifacts: "dist/*" allow-empty: "true" fingerprint: "true" diff --git a/jobs/templates/swh-folder.yaml b/jobs/templates/swh-folder.yaml index e7eb25b..aa66902 100644 --- a/jobs/templates/swh-folder.yaml +++ b/jobs/templates/swh-folder.yaml @@ -1,3 +1,4 @@ - job-template: - name: 'swh-{name}' + name: '{name}' + display-name: '{display-name}' project-type: folder diff --git a/jobs/templates/swh-pipeline.yaml b/jobs/templates/swh-pipeline.yaml index b187cc1..92e2b47 100644 --- a/jobs/templates/swh-pipeline.yaml +++ b/jobs/templates/swh-pipeline.yaml @@ -1,83 +1,83 @@ - job-template: - name: swh-{name}/tests + name: "{name}/tests" project-type: pipeline sandbox: true numToKeep: 20 dsl: | pipeline {{ agent {{ label 'swh-tox' }} parameters {{ string(name: 'BRANCH', defaultValue: 'master', description: 'branch to checkout from the repository') }} stages {{ stage('Checkout') {{ steps {{ git branch: "${{params.BRANCH}}", url: 'https://forge.softwareheritage.org/source/swh-{name}.git' }} }} 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 <