diff --git a/jobs/debian/schroot-maintenance.yaml b/jobs/debian/schroot-maintenance.yaml
index d9be344..301604c 100644
--- a/jobs/debian/schroot-maintenance.yaml
+++ b/jobs/debian/schroot-maintenance.yaml
@@ -1,15 +1,18 @@
- job:
name: debian/maintenance/schroot-maintenance
description: 'Update sbuild chroots.
Do not edit this job through the web interface, it is generated via jenkins-job-builder!'
project-type: matrix
child-workspace: .
execution-strategy:
sequential: true
axes:
- !include: axis-slave.yaml.inc
- !include: axis-distribution.yaml.inc
- !include: axis-architecture.yaml.inc
triggers:
- timed: "H */6 * * *"
+ properties:
+ - build-discarder:
+ days-to-keep: 7
builders:
- shell: /usr/share/jenkins/debian-scripts/schroot-maintenance.sh
diff --git a/jobs/debian/update-scripts.yaml b/jobs/debian/update-scripts.yaml
index 8375b30..0df2934 100644
--- a/jobs/debian/update-scripts.yaml
+++ b/jobs/debian/update-scripts.yaml
@@ -1,19 +1,22 @@
- job:
name: debian/maintenance/update-scripts
description: 'Update debian scripts from the jenkins-jobs repository'
project-type: matrix
child-workspace: .
axes:
- !include: axis-slave.yaml.inc
scm:
- git:
url: https://forge.softwareheritage.org/source/swh-jenkins-jobs/
branches:
- master
wipe-workspace: false
triggers:
- timed: "H * * * *"
+ properties:
+ - build-discarder:
+ days-to-keep: 7
builders:
- shell: chmod go+rX -R scripts/debian/
- shell: rsync -az --delete scripts/debian/ /usr/share/jenkins/debian-scripts/
- shell: rsync -az --delete keyrings/ /usr/share/keyrings/extra-repositories/
diff --git a/jobs/templates/debian/gbp-buildpackage.yaml b/jobs/templates/debian/gbp-buildpackage.yaml
index 237d715..6928b64 100644
--- a/jobs/templates/debian/gbp-buildpackage.yaml
+++ b/jobs/templates/debian/gbp-buildpackage.yaml
@@ -1,71 +1,74 @@
- job-template: &gbp_buildpackage
name: 'debian/packages/{name}/gbp-buildpackage'
description: |
Build Debian package
auth-token: 'ph4br1cat0r'
deb-extra-repositories:
deb-backport-on-success: unstable-swh>buster-swh
project-type: pipeline
+ properties:
+ - build-discarder:
+ num-to-keep: 10
parameters:
- string:
name: GIT_REVISION
default: debian/unstable-swh
description: Git revision to build
- string:
name: PHID
description: PHID of the phabricator target object on which results will be reported
- extended-choice:
name: EXTRA_REPOSITORIES
description: extra repositories needed to build this package
type: checkbox
value: !join:
- ','
-
- incoming
- backports
- swh
- ceph
- pgdg
- elasticsearch
- cassandra
value-description: !join:
- ','
-
- The buildd incoming repository (default for builds from unstable)
- The debian backports repository (default for builds for stable-swh)
- The Software Heritage debian repository (default for builds for swh branches)
- The ceph repository
- PostgreSQL Global Dvt Group repository (for stable-swh builds requiring latest postgresql)
- Elasticsearch 7.x repository (for builds requiring elasticsearch installed)
- Cassandra 4.x repository (for builds requiring cassandra installed)
default-value: '{deb-extra-repositories}'
- choice:
name: BUILD_DEP_RESOLVER
description: |
the sbuild build dependency resolver (overrides the automatic detection)
choices:
- ''
- apt
- aptitude
- bool:
name: DO_UPLOAD
description: upload the built package
default: false
- extended-choice:
name: BACKPORT_ON_SUCCESS
description: If the build is successful, which backports should we perform?
type: checkbox
value: !join:
- ','
-
- unstable-swh>stretch-swh
- unstable-swh>buster-swh
- unstable-swh>bullseye-swh
- buster-swh>stretch-swh
default-value: '{deb-backport-on-success}'
dsl:
!include-jinja2: gbp-buildpackage.groovy.j2
- job-template:
name: 'debian/deps/{name}/gbp-buildpackage'
<<: *gbp_buildpackage
diff --git a/jobs/templates/incoming-tag.yaml b/jobs/templates/incoming-tag.yaml
index 0f77019..1fe1950 100644
--- a/jobs/templates/incoming-tag.yaml
+++ b/jobs/templates/incoming-tag.yaml
@@ -1,22 +1,25 @@
- job-template: &incoming_tag
name: "{name}/incoming-tag"
display-name: Incoming tag
project-type: pipeline
auth-token: 'ph4br1cat0r'
incoming_tag_auto_pypi_host: pypi.org
sandbox: true
+ properties:
+ - build-discarder:
+ num-to-keep: 20
parameters:
- git-parameter:
name: GIT_TAG
description: git tag to process
type: PT_TAG
sortMode: DESCENDING_SMART
selectedValue: TOP
dsl:
!include-jinja2: incoming-tag.groovy.j2
- job-template:
name: "debian/deps/{name}/incoming-tag"
dsl:
!include-jinja2: dependency-incoming-tag.groovy.j2
<<: *incoming_tag
diff --git a/jobs/templates/swh-pipeline-diff.yaml b/jobs/templates/swh-pipeline-diff.yaml
index bfb2596..7b311e2 100644
--- a/jobs/templates/swh-pipeline-diff.yaml
+++ b/jobs/templates/swh-pipeline-diff.yaml
@@ -1,37 +1,40 @@
- job-template:
name: "{name}/tests-on-diff"
display-name: Phab. Diff
project-type: pipeline
docker_image: tox
cypress_docker_image: cypress
default-tox-environment: py3
sandbox: true
auth-token: 'ph4br1cat0r'
phabricator_diff: true
do_cypress: false
+ properties:
+ - build-discarder:
+ artifact-num-to-keep: 20
parameters:
- git-parameter:
name: REVISION
type: PT_REVISION
defaultValue: master
description: Git revision to build.
- string:
name: PHID
description: PHID of the Phabricator target object on which results will be reported.
- string:
name: DIFF_ID
description: ID of the Diff patch to apply, if any
- string:
name: REV_ID
description: ID of the Phabricator revision, if any
- string:
name: STAGING_URI
description: URI of the staging repository
- string:
name: TOX_ENVIRONMENT
description: tox environment to use for the main tox run
default: "{default-tox-environment}"
dsl:
!include-jinja2: swh-pipeline.groovy.j2
diff --git a/jobs/templates/swh-pipeline.yaml b/jobs/templates/swh-pipeline.yaml
index 273b3ee..f7f0d88 100644
--- a/jobs/templates/swh-pipeline.yaml
+++ b/jobs/templates/swh-pipeline.yaml
@@ -1,33 +1,33 @@
- job-template:
name: "{name}/tests"
display-name: "master branch"
project-type: pipeline
docker_image: tox
cypress_docker_image: cypress
default-tox-environment: py3
triggers:
- timed: '@daily'
sandbox: true
auth-token: 'ph4br1cat0r'
properties:
- build-discarder:
- num-to-keep: 20
+ artifact-num-to-keep: 20
phabricator_diff: false
do_cypress: false
parameters:
- git-parameter:
name: REVISION
type: PT_REVISION
defaultValue: master
description: Git revision to build.
- string:
name: PHID
description: PHID of the Phabricator target object on which results will be reported.
- string:
name: TOX_ENVIRONMENT
description: tox environment to use for the main tox run
default: "{default-tox-environment}"
dsl:
!include-jinja2: swh-pipeline.groovy.j2
diff --git a/jobs/templates/swh-pypi.yaml b/jobs/templates/swh-pypi.yaml
index b83f3c1..999904e 100644
--- a/jobs/templates/swh-pypi.yaml
+++ b/jobs/templates/swh-pypi.yaml
@@ -1,44 +1,44 @@
- job-template:
name: "{name}/pypi-upload"
display-name: "Upload to PyPI"
docker_image: tox
project-type: pipeline
sandbox: true
properties:
- build-discarder:
- num-to-keep: 20
+ artifact-num-to-keep: 10
parameters:
- git-parameter:
name: GIT_TAG
description: git tag to process
type: PT_TAG
sortMode: DESCENDING_SMART
selectedValue: TOP
- choice:
name: PYPI_HOST
description: |
PYPI registry to publish to when built revision is a tag. There
must exists a usernamePassword credential object with that name.
The pypi JSON API endpoint is built as https://$PYPI_HOST/project//json
choices:
- test.pypi.org
- pypi.org
default: test.pypi.org
- bool:
name: FORCE_UPLOAD
default: false
description: |
Force uploading python packages on the chosen PYPI registry, even if
the package already exists.
- bool:
name: SKIP_TESTS
default: false
description: |
Do not run tests on the repository.
- bool:
name: IGNORE_TESTS
default: false
description: |
Proceed even if the tests are failing on the repository.
dsl:
!include-jinja2: swh-pypi.groovy.j2
diff --git a/jobs/tools/dockerfiles.yaml b/jobs/tools/dockerfiles.yaml
index caabe1b..2de679c 100644
--- a/jobs/tools/dockerfiles.yaml
+++ b/jobs/tools/dockerfiles.yaml
@@ -1,18 +1,19 @@
- job:
name: jenkins-tools/swh-jenkins-dockerfiles
node: master
scm:
- git:
url: http://forge.softwareheritage.org/source/swh-jenkins-dockerfiles.git
wipe-workspace: false
triggers:
- pollscm:
cron: "H/30 * * * *"
- timed: '@daily'
- build-discarder:
- num-to-keep: 50
+ properties:
+ - build-discarder:
+ days-to-keep: 7
wrappers:
- timestamps
- ansicolor
builders:
- shell: make checkrebuild all