Apt/Jenkins
From PostgreSQL wiki
(Difference between revisions)
(source job configuration) |
|||
| Line 27: | Line 27: | ||
* Hit "build now" on the new source job | * Hit "build now" on the new source job | ||
* Watch the job's console output | * Watch the job's console output | ||
| + | |||
| + | ==Job Configuration=== | ||
| + | |||
| + | All "real" source/binaries jobs should be seeded from template jobs. The template jobs should then be configured as documented here. | ||
| + | |||
| + | ===Source Job Configuration=== | ||
| + | |||
| + | * Jobs need to be "matrix" (multi-configuration) style jobs. | ||
| + | * Project name: For the debian-jenkins-glue/pgdg scripts to work properly, source jobs must be named ''package'''''-source'''. (There might be an extra optional suffix at the end.) | ||
| + | * Discard Old Builds (optional): Max # of builds to keep: 3 | ||
| + | * This build is parameterized (optional): | ||
| + | ** String Parameter | ||
| + | ** Name: revision | ||
| + | ** Default Value: (blank) | ||
| + | ** Description: Number to use in the .pgdg+X package version suffix. Defaults to the .pgdg+X number found in the current changelog, or 1 otherwise. | ||
| + | * Source Code Management, one of | ||
| + | ** Git | ||
| + | *** Repository URL: e.g. git://anonscm.debian.org/pkg-postgresql/pgpool2.git | ||
| + | *** Advanced (the second "Advanced" button just above "Repository Browser" | ||
| + | **** "Local subdirectory for repo (optional)" (''not optional''): source | ||
| + | ** Subversion | ||
| + | *** ... | ||
| + | ** Bazaar | ||
| + | *** ... | ||
| + | * Configuration Matrix | ||
| + | ** User-defined Axis | ||
| + | *** Name: distribution | ||
| + | *** Values: sid wheezy squeeze | ||
| + | ** Run each configuration sequentially (recommended) | ||
| + | ** Execute touchstone builds first (highly recommended) | ||
| + | *** Filter: distribution=="sid" | ||
| + | * Build Environment, one of | ||
| + | ** Implement Template | ||
| + | *** Template Name: git-source-template | ||
| + | *** Template Variables: | ||
| + | **** giturl=git://anonscm.debian.org/pkg-postgresql/pgpool2.git | ||
| + | **** package=pgpool2 | ||
| + | ** Make this a Template | ||
| + | * Build | ||
| + | ** Execute Shell | ||
| + | *** generate-pgdg-source | ||
| + | * Post-build Actions | ||
| + | ** Archive the artifacts | ||
| + | *** result/* | ||
| + | ** Record fingerprints of files to track usage (optional) | ||
| + | *** Fingerprint all archived artifacts | ||
| + | ** IRC Notification (optional) | ||
| + | *** Advanced | ||
| + | **** Notify for matrix projects: ONLY PARENT (recommended) | ||
| + | ** Trigger parameterized build of other projects | ||
| + | *** Projects to build: ''package'''''-binaries''' | ||
| + | *** Trigger build without parameters | ||
Revision as of 07:53, 13 October 2012
Packages are built in a [Jenkins] installation at https://pgdgbuild.dus.dg-i.net/jenkins/ (login required).
We are using Mika Prokop's [Jenkins-Debian-Glue] scripts.
For every package, there are two jobs:
- foobar-source builds .dsc source packages from an VCS repository
- foobar-binaries builds .deb binary packages from the source packages
These jobs then trigger common jobs:
- postgresql-testsuite runs the postgresql-common testsuite on the server packages built
- dput uploads the source and binary packages to the repository host
Creating New Jobs
New jobs should use the templating mechanism provided by JoelJ's [Templating plugin].
- Go to "Scaffolding"
- Select the scaffold for the VCS the package is using, e.g. "git-package"
- "Stand up" the scaffold, and fill in the variables
- giturl: Git URL for the package
- package: package name
- Go to the new source job (called like git-source-templatepackage), select configure, and rename the job to package-source
- Go to the new binaries job (called like postgresql-binaries-templatepackage), select configure, and rename the job to package-binaries
- Configure the package-binaries jobs to trigger the dput project (FIXME: this should be part of the template)
- Hit "build now" on the new source job
- Watch the job's console output
Job Configuration=
All "real" source/binaries jobs should be seeded from template jobs. The template jobs should then be configured as documented here.
Source Job Configuration
- Jobs need to be "matrix" (multi-configuration) style jobs.
- Project name: For the debian-jenkins-glue/pgdg scripts to work properly, source jobs must be named package-source. (There might be an extra optional suffix at the end.)
- Discard Old Builds (optional): Max # of builds to keep: 3
- This build is parameterized (optional):
- String Parameter
- Name: revision
- Default Value: (blank)
- Description: Number to use in the .pgdg+X package version suffix. Defaults to the .pgdg+X number found in the current changelog, or 1 otherwise.
- Source Code Management, one of
- Git
- Repository URL: e.g. git://anonscm.debian.org/pkg-postgresql/pgpool2.git
- Advanced (the second "Advanced" button just above "Repository Browser"
- "Local subdirectory for repo (optional)" (not optional): source
- Subversion
- ...
- Bazaar
- ...
- Git
- Configuration Matrix
- User-defined Axis
- Name: distribution
- Values: sid wheezy squeeze
- Run each configuration sequentially (recommended)
- Execute touchstone builds first (highly recommended)
- Filter: distribution=="sid"
- User-defined Axis
- Build Environment, one of
- Implement Template
- Template Name: git-source-template
- Template Variables:
- giturl=git://anonscm.debian.org/pkg-postgresql/pgpool2.git
- package=pgpool2
- Make this a Template
- Implement Template
- Build
- Execute Shell
- generate-pgdg-source
- Execute Shell
- Post-build Actions
- Archive the artifacts
- result/*
- Record fingerprints of files to track usage (optional)
- Fingerprint all archived artifacts
- IRC Notification (optional)
- Advanced
- Notify for matrix projects: ONLY PARENT (recommended)
- Advanced
- Trigger parameterized build of other projects
- Projects to build: package-binaries
- Trigger build without parameters
- Archive the artifacts
