Jenkins
=======
-Plugins required
-----------------
+## Plugins required
+
Build Name and Description Setter
-Collapsing Console Sections Plugin
-Copy Artifact Plugin
-Git Plugin
-Green Balls Plugin
-IRC Plugin
-Matrix Combinations Plugin (aka Matrix Configuration Parameter)
+Collapsing Console Sections
+Copy Artifact
+Git
+#Green Balls
+IRC
+Matrix Project
+Matrix Combinations (aka Matrix Configuration Parameter)
Multiple SCMs
-Node and Label parameter plugin
-Parameterized Trigger Plugin
-Priority Sorter Plugin
-Reverse Proxy Auth Plugin
-SCM Sync Plugin
-Strict Crumbs Issuer Plugin ("Check Session ID" off for compatibility with jenkins-job-builder)
-Text-finder Plugin
-Throttle Concurrent Builds
-Timestamper Plugin
+Node and Label parameter
+Parameterized Trigger
+#Priority Sorter
+#Reverse Proxy Auth
+#SCM Sync
+#Strict Crumbs Issuer ("Check Session ID" off for compatibility with jenkins-job-builder)
+Text-finder
+#Throttle Concurrent Builds
+Timestamper
Pipeline: Build Step
-Pipeline Model Definition Plugin
-Pipeline Stage View Plugin
+Pipeline: Declarative
+#Pipeline Model Definition
+Pipeline: Stage View
+Workspace Cleanup
+View Job Filters
-## Collapsing Console Sections Plugin config for sbuild logs
+## Collapsing Console Sections config for sbuild logs
Section name: {1}
Section starts with: ^\| (.+[a-z]) +\|$
(One-per-line ending: doesn't matter)
-Priority Sorter Plugin config
------------------------------
+## Priority Sorter config
+
Global config: 5 priority levels, 3 default
Job Priorities config:
- extension-only
- all
- slaves_axis: &slaves_axis
+ all_nodes_axis: &all_nodes_axis
type: slave
name: slave
values:
- master
- - arm64-1
- - ppc64el-1
- - s390x-1
- - x86-1
+ - arm64
+ - ppc64el
+ - s390x
+ - x86
+ slaves_axis: &slaves_axis
+ type: slave
+ name: slave
+ values:
+ - arm64
+ - ppc64el
+ - s390x
+ - x86
x86_slaves_axis: &x86_slaves_axis
type: slave
name: slave
values:
- - x86-1
+ - x86
arm64_slaves_axis: &arm64_slaves_axis
type: slave
name: slave
values:
- - arm64-1
+ - arm64
ppc64el_slaves_axis: &ppc64el_slaves_axis
type: slave
name: slave
values:
- - ppc64el-1
+ - ppc64el
s390x_slaves_axis: &s390x_slaves_axis
type: slave
name: slave
values:
- - s390x-1
+ - s390x
arch_axis: &arch_axis
type: slave
name: postgresql-server-jobs
git-url: https://salsa.debian.org/postgresql/postgresql.git
upstream-url: https://git.postgresql.org/git/postgresql.git
- reference-repo: '$HOME/gitcache.buexcl/postgresql'
+ reference-repo: '/srv/jenkins/gitcache/postgresql'
jobs:
- 'build-pipeline'
- 'source-git'
workspace: '$HOME/apt.postgresql.org'
child-workspace: .
axes:
- - axis: *slaves_axis
+ - axis: *all_nodes_axis
scm: &scm_pgapt
- git:
url: https://git.postgresql.org/git/pgapt.git
wipe-workspace: false
builders:
- shell: 'chmod go+rX -R .' # make directory readable for other workers
- - shell: 'make install' # install /etc/schroot/chroot.d/sbuild.conf
+ - shell: 'test -d /home/buildd && make install' # install /etc/schroot/chroot.d/sbuild.conf
publishers:
- trigger:
project: apt.postgresql.org-jobs
- job:
name: gitcache-postgresql
description: Reference repository postgresql source jobs
- workspace: '$HOME/gitcache.buexcl/postgresql'
+ workspace: '/srv/jenkins/gitcache/postgresql'
scm:
- git:
url: https://git.postgresql.org/git/postgresql.git
strategy: any-failure
message-type: summary
-- job: &ping
- name: ping-ppc64el
- description: Check if the ppc64el build host is up
- workspace: '$JENKINS_HOME'
- node: master
- triggers:
- - timed: "H */4 * * *"
- builders:
- - shell: 'ping -c3 10.3.22.22'
- publishers:
- - ircbot:
- strategy: any-failure
- message-type: summary
-
- job:
- <<: *ping
name: jenkins-plugin-updates
description: Reports pending Jenkins plugin updates
+ node: master
triggers:
- timed: "59 10 * * *"
builders:
- shell: |
- : https://pgdgbuild.dus.dg-i.net/pluginManager/
+ : https://jengus.postgresql.org/pluginManager/
# this broke in mid-March 2020, ignore errors for now
- curl -f --netrc -X POST --header 'Referer: https://pgdgbuild.dus.dg-i.net/pluginManager/checkUpdatesServer' https://pgdgbuild.dus.dg-i.net/pluginManager/checkUpdatesServer || :
+ curl -f --netrc -X POST --header 'Referer: https://jengus.postgresql.org/pluginManager/checkUpdatesServer' https://pgdgbuild.dus.dg-i.net/pluginManager/checkUpdatesServer || :
ssh -i ~/.ssh/slave -p 2222 jenkins@localhost list-plugins > plugins.txt
cat plugins.txt
if grep ')$' plugins.txt; then
: There are pending Jenkins plugin updates
- : https://pgdgbuild.dus.dg-i.net/pluginManager/
+ : https://jengus.postgresql.org/pluginManager/
exit 1
fi
-
-- job:
- <<: *ping
- name: scm-sync-status
- description: Reports SCM Sync errors
- triggers:
- - timed: "59 10 * * *"
- builders:
- - shell: |
- ls -l scm-sync-configuration.*
- if test -f scm-sync-configuration.fail.log; then
- cat scm-sync-configuration.fail.log
- test scm-sync-configuration.success.log -nt scm-sync-configuration.fail.log
- fi
-
-- job:
- <<: *ping
- name: apache2-running
- description: Check if apache2 is running
- builders:
- - shell: 'systemctl status apache2'
+ publishers:
+ - ircbot:
+ strategy: any-failure
+ message-type: summary
# project jobs
jobs:
- git-packages
+# views
+
+- view:
+ name: Auxiliary
+ description: Helper and infrastructure jobs
+ view-type: list
+ job-name:
+ - apt.postgresql.org
+ - apt.postgresql.org-jobs
+ - builddebcheck
+ - debcheck
+ - dput
+ - dput-matrixreloaded
+ - gitcache-postgresql
+ - hardlink-jenkins-files
+ - jenkins-plugin-updates
+ - list-upgradable-packages
+ - sbuild-update-arm64
+ - sbuild-update-ppc64el
+ - sbuild-update-s390x
+ - sbuild-update-x86
+ - stale-schroot-sessions
+ - update-jenkins-plugins
+ columns: &view_columns
+ - status
+ - job
+ - build-button
+ - last-success
+ - last-failure
+ - last-duration
+
+- view:
+ name: Binaries
+ view-type: list
+ regex: '.*binaries'
+ columns: *view_columns
+
+- view:
+ name: Binaries-Beta
+ view-type: list
+ regex: '.*binaries-beta'
+ columns: *view_columns
+
+- view:
+ name: Default
+ view-type: list
+ regex: '.*(?<!-autopkgtest|-binaries|-source|-beta|-snapshot)$'
+ columns: *view_columns
+
+- view:
+ name: PostgreSQL
+ view-type: list
+ regex: 'postgresql-[\d.]*(|-autopkgtest.*|-binaries.*|-source.*)|postgresql-common.*|upgrade-.*'
+ columns: *view_columns
+
+- view:
+ name: Snapshot
+ view-type: list
+ regex: '.*-snapshot'
+ columns: *view_columns
+
+- view:
+ name: Source
+ view-type: list
+ regex: '.*-source.*'
+ columns: *view_columns
+
+- view:
+ name: Testsuite
+ view-type: list
+ job-name:
+ - builddebcheck
+ - debcheck
+ regex: '.*-autopkgtest'
+ columns: *view_columns
+
+- view:
+ name: Testsuite-Beta
+ view-type: list
+ regex: '.*-autopkgtest-beta'
+ columns: *view_columns
+
##
# ./trigger-job dput 'binaries=postgresql-12-binaries'
# ~/.netrc:
-#machine pgdgbuild.dus.dg-i.net login <username> password <your-api-token>
+#machine jengus.postgresql.org login <username> password <your-api-token>
set -e
set -x
curl -f --netrc \
- "https://pgdgbuild.dus.dg-i.net/job/$JOB/buildWithParameters" \
+ "https://jengus.postgresql.org/job/$JOB/buildWithParameters" \
--data "$*"
#for JOB in $JOB{,-source,-binaries,-autopkgtest,-autopkgtest-beta,-source-snapshot,-binaries-snapshot}; do
-#curl --netrc -X POST "https://pgdgbuild.dus.dg-i.net/job/$JOB/doDelete"
+#curl --netrc -X POST "https://jengus.postgresql.org/job/$JOB/doDelete"
#done