The REPOSITORY variable is used to set the main/base path for the
(reprepro) repositories (defaulting to /srv/repository). This
REPOSITORY setting could be defined via /etc/jenkins/debian_glue.
Since we are sourcing /etc/jenkins/debian_glue in our scripts
this overwrites a possibly existing environment variables named
REPOSITORY, preventing us to overwrite the REPOSITORY setting on
demand as needed as soon as REPOSITORY is configured in
/etc/jenkins/debian_glue.
To fix that behaviour we hereby rename the REPOSITORY variable to
DEFAULT_REPOSITORY while being backwards compatible. If you have
configured REPOSITORY via /etc/jenkins/debian_glue please rename
it to DEFAULT_REPOSITORY instead. In an upcoming release we might
drop backwards compatibility.
Thanks: Jean Baptiste Favre for the bug report
eatmydata support gets enabled by default if it's installed on
the host system and when building for a recent Debian/Ubuntu
version (Debian/jessie + Ubuntu/vivid or newer). Usage can be
forced via USE_EATMYDATA=true and disabled via
USE_EATMYDATA=false.
ccache support can be enabled via USE_CCACHE=true
Thanks to Franco (nextime) Lanza for the initial patch in
https://github.com/mika/jenkins-debian-glue/pull/125
Support ADT configurations are:
* skip: don't run any (neither internal nor external) autopkgtests
* internal: execute autopkgtests only inside cowbuilder environment
(default if unset)
* external: execute autopkgtests outside of cowbuilder environment
through dedicated adt-run virt-server, requires
ADT_RUNNER to be configured accordingly
* all: execute internal and external autopkgtests
Thanks: Alexander Wirt for idea and feedback
Verifying the integrity of our repository is basically mandatory when the
build server is separated from the repository server. Additionally, if you
want to build a package for Squeeze that has a dependency on a package from
our repository the package list *MUST* be verified because "[trusted=yes]" in
the sources list is not yet supported by that apt version.
If the PBUILDER_CONFIG configuration is pointing to a file then
its argument is used for pbuilder's --configfile option.
For example when using the following option in /etc/jenkins/debian_glue:
PBUILDER_CONFIG=/etc/jenkins/pbuilderrc
and the following configuration is present in /etc/jenkins/pbuilderrc:
CCACHEDIR=/var/cache/pbuilder/ccache
then jenkins-debian-glue and its cowdancer system will use the
provided directory as ccache to speed up builds.
Development sponsored by Sipwise GmbH.
By default, if building a package for a release, it is assumed, that
this version has never been part of the release. Thus building the same
version again will fail, since reprepro will not allow adding this.
This patch adds a new option REMOVE_FROM_RELEASE which will force a
removal of the package from a release prior to incoming processing,
which may be useful in some cases (e.g. wanted rebuilds of releases)
Implemented as follows:
* build-and-provide-package uses the new pbuilder-hookdir directory
by default. The pbuilder-hookdir script B20autopkgtest runs the
actual tests using autopkgtest iff debian/tests/control is
present in the Debian package, otherwise skipping the test
execution so behaviour of build-and-provide-package is the
same as before.
The hook directory defaults to /usr/share/jenkins-debian-glue/pbuilder-hookdir/
and can be configured by the $PBUILDER_HOOKDIR setting.
To skip any autopkgtest output handling the $SKIP_AUTOPKGTEST_RESULTS
configuration can be set.
* build-and-provide-package: copies autopkgtest output into
directory 'adt' for later processing via adtsummary_tap
* adtsummary_tap: this script generates a TAP report of
the autopkgtest output, usage inside a Jenkins job as shell
executer step like:
mkdir -p report adt
touch adt/summary # do not fail if no autopkgtest run took place
adtsummary_tap adt/summary > report/autopkgtest.tap
and using 'report/*.tap' for Post-build action "Publish TAP Results".
It's recommended to use a recent version of autopkgtest. The
one provided by Christoph Berg <myon@debian.org> at
http://apt.postgresql.org/pub/repos/apt/pool/main/a/autopkgtest/
(autopkgtest_2.2.3.pgdg+1 at the time of this commit)
is known to work fine and also includes a bugfix for:
| TypeError: coercing to Unicode: need string or buffer, instance found
which is reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696625
Please note that autopkgtest isn't required on the system providing
cowbuilder but instead *inside* the cowbuilder environment.
Thanks to Christoph Berg <myon@debian.org> for his initial work on
autopkgtest support in jenkins-debian-glue and his permission to
integrate it in the mainline project.
Support setting PROVIDE_ONLY for skipping cowbuilder stage
and BUILD_ONLY for skipping reprepro repository stage.
Drop REMOTE_REPOS configuration variable, as the name actually
doesn't reflect what the script supports nor is it of any use
in the main configuration file when having PROVIDE_ONLY and
BUILD_ONLY available.
This provides the base for using $job-source, $job-binaries and
$job-repos to get the build process scaling and distributed on
specific slaves.
If we're building a package for more than one architecture and
the source package provides architecture 'any' *and* 'all' binary
packages at the same time we've to build on all but one
architecture using the -B build option (see dpkg-buildpackage(1)
for details).
Setting MAIN_ARCHITECTURE allows choosing the main architecture,
which is the one providing the "Architecture: all" binary
packages. If unset it defaults to the architecture of the host
system.
Restructure the code to make it less ugly...
Setting TRUNK_RELEASE allows copying each package to
a specific repository so you get a "release-trunk"
feature to point sources.list to a repository featuring
always the latest package versions.