├── .mailmap ├── LICENSE ├── Makefile ├── NOTES.org ├── README.md ├── debian ├── .gitignore ├── NEWS ├── changelog ├── control ├── copyright ├── jenkins-debian-glue.docs ├── jenkins-debian-glue.install ├── jenkins-debian-glue.links ├── jenkins-debian-glue.lintian-overrides ├── rules └── source │ └── format ├── examples └── debian_glue ├── fabfile.py ├── git └── post-receive ├── github ├── Gemfile ├── README ├── config.yml └── hook_server.rb ├── jjb ├── README ├── jdg-freight.yaml └── jdg-reprepro.yaml ├── pbuilder-hookdir ├── B20autopkgtest ├── B90lintian ├── C10shell ├── D10-man-db ├── D10aptspeedup └── D20releaserepo ├── puppet ├── apply.sh └── jenkins_debian_glue.pp ├── scripts ├── jdg-build-and-provide-package ├── jdg-debc ├── jdg-generate-git-snapshot ├── jdg-generate-reprepro-codename ├── jdg-generate-svn-snapshot ├── jdg-increase-version-number ├── jdg-lintian-junit-report ├── jdg-piuparts-wrapper ├── jdg-remove-reprepro-codename └── jdg-repository-checker ├── svn ├── post-commit └── trigger_jenkins ├── tap ├── jdg-tap-adtsummary ├── jdg-tap-checkbashism ├── jdg-tap-merge-conflict ├── jdg-tap-pep8 ├── jdg-tap-perlcritic ├── jdg-tap-piuparts ├── jdg-tap-shellcheck └── jdg-tap-tool-dispatcher └── tests ├── file-detection ├── fixtures ├── file-detection │ ├── perlcritic │ ├── shellcheck │ └── test.sh └── merge-conflict │ ├── ko.txt │ └── ok.txt ├── increase-version-number └── merge-conflict /.mailmap: -------------------------------------------------------------------------------- 1 | # Useful for `git shortlog` and generating AUTHORS file via `git log --format='%aN <%aE>' | sort -uf` 2 | 3 | # Michael Prokop's multiple personalities 4 | 5 | 6 | 7 | 8 | 9 | 10 | Sławomir Bocheński 11 | Alexander Wirt 12 | Christian Hofstaedtler 13 | Lukas Anzinger 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011,2012,2013,2014 by Michael Prokop 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PREFIX := /usr 2 | 3 | PROGRAMS := scripts/* tap/* 4 | 5 | build: 6 | tests/merge-conflict 7 | tests/increase-version-number 8 | tests/file-detection 9 | 10 | install: $(scripts) 11 | mkdir -p $(DESTDIR)/$(PREFIX)/bin/ 12 | for prog in $(PROGRAMS); do \ 13 | install -m 0755 $$prog $(DESTDIR)/$(PREFIX)/bin; \ 14 | done 15 | 16 | mkdir -p $(DESTDIR)/usr/share/jenkins-debian-glue/examples/ 17 | install -m 0664 examples/* $(DESTDIR)/usr/share/jenkins-debian-glue/examples/ 18 | mkdir -p $(DESTDIR)/usr/share/jenkins-debian-glue/pbuilder-hookdir/ 19 | install -m 0775 pbuilder-hookdir/* $(DESTDIR)/usr/share/jenkins-debian-glue/pbuilder-hookdir/ 20 | 21 | uninstall: $(scripts) 22 | for prog in $(PROGRAMS); do \ 23 | rm $(DESTDIR)/$(PREFIX)/bin/$${prog#scripts} ; \ 24 | done 25 | rm -rf $(DESTDIR)/usr/share/jenkins-debian-glue/examples 26 | rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/jenkins-debian-glue 27 | 28 | deploy: 29 | fab all 30 | 31 | clean: 32 | rm -f fabfile.pyc 33 | # avoid recursion via debian/rules clean, so manually rm: 34 | rm -f debian/files debian/jenkins-debian-glue.debhelper.log 35 | rm -f debian/jenkins-debian-glue.substvars 36 | rm -rf debian/jenkins-debian-glue/ 37 | 38 | .PHONY: build install 39 | -------------------------------------------------------------------------------- /NOTES.org: -------------------------------------------------------------------------------- 1 | * Misc Notes related to Jenkins 2 | 3 | This document provides some notes you might consider useful, but aren't necessarily related to jenkins-debian-glue itself. 4 | 5 | ** Install jenkins.rb on Debian 6 | 7 | Goal: Clean installation of https://github.com/cowboyd/jenkins.rb on Debian, using Debian packages. 8 | 9 | Recipe provided by Michael Prokop: 10 | 11 | #+BEGIN_EXAMPLE 12 | mkdir jenkins-rb.deb ; cd jenkins-rb.deb 13 | gem2deb httparty 14 | gem2deb crack 15 | gem2deb thor 16 | sudo apt-get install libterm-ansicolor-ruby ruby-json libbuilder-ruby 17 | sudo dpkg -i ruby-crack_*.deb ruby-httparty_*.deb ruby-jenkins_*.deb ruby-thor_*.deb 18 | #+END_EXAMPLE 19 | 20 | Recipe provided by Michael Gebetsroither: 21 | 22 | #+BEGIN_EXAMPLE 23 | git clone https://github.com/gebi/rubyrrdtool.git 24 | cd rubyrrdtool 25 | ruby extconf.rb 26 | make 27 | checkinstall -D --pkgname=rubyrrdtool --maintainer=whatever@example.org --install=no --pkgversion=0.6.0 make install 28 | #+END_EXAMPLE 29 | 30 | 31 | ** Install python-jenkins on Debian 32 | 33 | Goal: Clean installation of https://launchpad.net/python-jenkins on Debian, using Debian packages. 34 | 35 | Recipe provided by Michael Prokop: 36 | 37 | #+BEGIN_EXAMPLE 38 | bzr branch lp:python-jenkins 39 | cd python-jenkins 40 | apt-get install python-stdeb 41 | python setup.py --command-packages=stdeb.command bdist_deb 42 | sudo dpkg -i deb_dist/python-*deb 43 | #+END_EXAMPLE 44 | 45 | 46 | ** Use chroot for building non-Debian stuff 47 | 48 | Goal: Do not build stuff on Jenkins Master/Slaves but use a dedicated chroot instead. 49 | 50 | Background: Whereas jenkins-debian-glue uses cowbuilder/pbuilder and its separate chroots for building you might want to also build 51 | e.g. documentation without abusing your main build host(s). Using dedicated chroots as slave nodes inside Jenkins provides that. 52 | 53 | Set up a basic chroot (e.g. Debian/squeeze): 54 | 55 | #+BEGIN_EXAMPLE 56 | debootstrap squeeze /srv/chroot_documentation_builder http://debian.inode.at/debian 57 | wget -O ./make_chroot_jail https://github.com/grml/grml-scripts/raw/master/usr_sbin/make_chroot_jail 58 | bash ./make_chroot_jail chroot-docs /bin/chroot-shell /srv/chroot_documentation_builder 59 | #+END_EXAMPLE 60 | 61 | Test the login via SSH running: 62 | 63 | : ssh chroot-docs@localhost 64 | 65 | Finally install Java (required for Jenkins) and build-essential (and optionally whatever you might also need): 66 | 67 | #+BEGIN_EXAMPLE 68 | chroot /srv/chroot_documentation_builder 69 | mount -t proc none /proc 70 | apt-get install openjdk-6-jre 71 | mkdir /var/lib/jenkins 72 | chown chroot-docs /var/lib/jenkins/ 73 | apt-get install build-essential 74 | #+END_EXAMPLE 75 | 76 | Then configure a new Slave node in Jenkins using /var/lib/jenkins as $HOME directory and user chroot-docs as login. 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jenkins-debian-glue 2 | =================== 3 | 4 | Continuous Integration for Debian and Ubuntu made easy. 5 | jenkins-debian-glue allows you to build Debian and Ubuntu packages 6 | directly from the Jenkins Continuous Integration system. 7 | 8 | Please head over to [jenkins-debian-glue.org](http://jenkins-debian-glue.org/) 9 | for setup instructions and documentation. 10 | -------------------------------------------------------------------------------- /debian/.gitignore: -------------------------------------------------------------------------------- 1 | *.debhelper 2 | *.log 3 | *.substvars 4 | /.debhelper/ 5 | /debhelper-build-stamp 6 | /files 7 | /jenkins-debian-glue-buildenv/ 8 | /jenkins-debian-glue/ 9 | -------------------------------------------------------------------------------- /debian/NEWS: -------------------------------------------------------------------------------- 1 | jenkins-debian-glue (0.22.0) unstable; urgency=medium 2 | 3 | To reduce the namespace pollution, all programs are namespaced now with 4 | «jdg-» or «jdg-tap-» and their names had their ‘_’ replaced with ‘-’. 5 | 6 | For backwards compatibility symlinks are provided for a transition period 7 | to avoid breakage, but projects should be switched to the new names, which 8 | will disappear eventually. 9 | 10 | -- Guillem Jover Thu, 11 Feb 2021 22:24:37 +0100 11 | 12 | jenkins-debian-glue (0.14.0) unstable; urgency=medium 13 | 14 | To reduce the amount of Debian binary packages we decided to 15 | minimize the number of packages we ship via jenkins-debian-glue. 16 | This means that the packages named 17 | jenkins-debian-glue-buildenv-git, 18 | jenkins-debian-glue-buildenv-svn, 19 | jenkins-debian-glue-buildenv-slave, 20 | jenkins-debian-glue-buildenv-lintian, 21 | jenkins-debian-glue-buildenv-taptools and 22 | jenkins-debian-glue-buildenv-piuparts are deprecated now. 23 | To get all the scripts just the jenkins-debian-glue package is 24 | needed. To install all the Debian packages that might be needed 25 | to be useful with all the scripts the 26 | jenkins-debian-glue-buildenv package can be used. If you don't 27 | want to install all the packages which are listed in 28 | jenkins-debian-glue-buildenv's Depends/Recommends you're 29 | encouraged to create your own metapackage or use the 30 | configuration management system of your choice. 31 | 32 | -- Michael Prokop Sat, 22 Aug 2015 12:26:59 +0200 33 | 34 | jenkins-debian-glue (0.6.0) unstable; urgency=low 35 | 36 | The timestamp format used in automatically generated version 37 | strings changed. 38 | 39 | Until and including version 0.5.0 jenkins-debian-glue's 40 | generate-git-snapshot and generate-svn-snapshot scripts used 41 | "seconds since 1970-01-01 00:00:00 UTC" inside the version 42 | string. The new timestamp format YYYYMMDDhhmmss (in UTC) sorts 43 | equally well as unix timestamp and yet it is much more usable 44 | for human beings. As this timestamp change still increases the 45 | version numbers the change does NOT break any existing setups, 46 | but to avoid confusion it's worth noting. 47 | 48 | -- Michael Prokop Mon, 10 Jun 2013 23:38:45 +0200 49 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | jenkins-debian-glue (0.23.5) unstable; urgency=medium 2 | 3 | * [6fa08b8] jdg-tap-tool-dispatcher: fix file-list handling with 4 | jdg-tap-merge-conflict 5 | * [2f0ce4e] puppet: drop jenkins.grml.org usage, use j-d-g packages from 6 | Debian instead 7 | * [f263a20] puppet: drop Jenkins plugin support 8 | * [58059f7] puppet: drop support for ancient openjdk releases 9 | * [ebfa17b] puppet: update usage instructions to clarify current plugin 10 | situation 11 | * [2044974] d/control: Bump Standards-Version to 4.7.2 12 | 13 | -- Michael Prokop Tue, 22 Apr 2025 09:46:27 +0200 14 | 15 | jenkins-debian-glue (0.23.4) unstable; urgency=medium 16 | 17 | * [f3c55ce] tap: replace deprecated File.exists? with File.exist? 18 | (Closes: #1102381) 19 | 20 | -- Michael Prokop Tue, 08 Apr 2025 15:39:06 +0200 21 | 22 | jenkins-debian-glue (0.23.3) unstable; urgency=medium 23 | 24 | [ Victor Seva ] 25 | * [11da68f] tap: improve file detection 26 | * [ddb1157] Makefile: add missing test 27 | 28 | -- Michael Prokop Mon, 07 Apr 2025 13:10:42 +0200 29 | 30 | jenkins-debian-glue (0.23.2) unstable; urgency=medium 31 | 32 | * d/control: replace deprecated Recommends on pep8 with pycodestyle. 33 | Thanks to Alexandre Detiste (Closes: #1093162) 34 | * tap/jdg-tap-pep8: check for pycodestyle by default 35 | * tap/jdg-tap-tool-dispatcher: enable jdg-tap-pep8 via pycodestyle 36 | 37 | -- Michael Prokop Fri, 17 Jan 2025 12:20:23 +0100 38 | 39 | jenkins-debian-glue (0.23.1) unstable; urgency=medium 40 | 41 | [ Victor Seva ] 42 | * [340773d] tap: fix missing disable-mergecheck option on getopt 43 | * [91ec1c8] tap: [merge-conflict] skip directory arguments 44 | * [60bc828] tap: [merge-conflict] improve merge detection 45 | 46 | -- Michael Prokop Mon, 16 Sep 2024 19:01:53 +0200 47 | 48 | jenkins-debian-glue (0.23.0) unstable; urgency=medium 49 | 50 | [ Oleh Horbachov ] 51 | * [0d3b8ab] Updated jenkins PGP key 52 | 53 | [ Victor Seva ] 54 | * [0d54b7f] tap: detect merge conflicts tool 55 | * [f1caf36] tap: add merge-conflict by default on tap-tool-dispatcher 56 | 57 | [ Michael Prokop ] 58 | * [c2b1d1f] Fix lintian issue with ruby-script-but-no-ruby-dep. Thanks 59 | to Victor Seva for feedback 60 | 61 | -- Michael Prokop Wed, 19 Jun 2024 12:01:10 +0200 62 | 63 | jenkins-debian-glue (0.22.1) unstable; urgency=medium 64 | 65 | [ Marius Gripsgard ] 66 | * [5e6accb] [generate-git-snapshot] Allow to disable pre cleanup 67 | via SKIP_PRE_CLEANUP 68 | 69 | [ Michael Prokop ] 70 | * [b981871] puppet: fix new jdg-repository-checker naming 71 | * [b357d58] puppet: add further plugin dependencies 72 | 73 | -- Michael Prokop Tue, 06 Dec 2022 08:25:12 +0100 74 | 75 | jenkins-debian-glue (0.22.0) unstable; urgency=medium 76 | 77 | [ Guillem Jover ] 78 | * [a7ca611] Use better characters for text boxing in piuparts hook 79 | * [c232683] Remove superfluous debian/tmp prefix from debhelper .install 80 | file 81 | * [886884c] Namespace and rename programs to reduce the namespace 82 | pollution 83 | 84 | [ Michael Prokop ] 85 | * [55d040d] build-and-provide-package: Use InRelease file instead of 86 | Release. Thanks to Mykola Malkov 87 | * [81fb098] scripts/build-and-provide-package: replace egrep usage with 88 | grep -E 89 | 90 | [ Debian Janitor ] 91 | * [94d0d46] Remove constraints unnecessary since buster(oldstable) 92 | 93 | -- Michael Prokop Fri, 04 Nov 2022 17:00:16 +0100 94 | 95 | jenkins-debian-glue (0.21.1) unstable; urgency=medium 96 | 97 | [ Sergii Kipot ] 98 | * [6749b85] Add support for pycodestyle tool 99 | 100 | [ Michael Prokop ] 101 | * [7105d59] puppet: drop package dependency on ttf-dejavu 102 | * [05f82bb] Switch everything from git:// to https:// 103 | * [eeb543e] puppet: drop user setup and management of 104 | /var/lib/jenkins/config.xml 105 | * [22c9255] puppet: add a bunch of indirectly dependent plugins 106 | * [81aaa61] debian: Bump Standards-Version to 4.6.1 107 | 108 | -- Michael Prokop Thu, 25 Aug 2022 13:54:47 +0200 109 | 110 | jenkins-debian-glue (0.21.0) unstable; urgency=medium 111 | 112 | [ Michael Prokop ] 113 | * [bec262f] Trim trailing whitespace 114 | * [67b3e51] scripts/piuparts_wrapper: switch to deb.debian.org as 115 | default mirror 116 | * [787018b] puppet: use Debian arch for configuring architecture axes 117 | * [d33fc2c] Bump Standards-Version to 4.5.0 118 | * [74c4861] puppet: depend on several plugins to get a working junit 119 | plugin 120 | * [eb3bb89] Bump Standards-Version to 4.5.1 121 | 122 | [ Debian Janitor ] 123 | * [e0455d1] Update standards version to 4.4.1, no changes needed. 124 | * [ed994b5] Bump debhelper from old 10 to 12. 125 | * [b9bc2dd] Set debhelper-compat version in Build-Depends. 126 | 127 | [ Ratchanan Srirattanamet ] 128 | * [54cfa30] build-and-provide-package: fix debian/control lookup for 129 | non-native pkgs 130 | 131 | [ Calvin Walton ] 132 | * [79ab9b4] Ensure the keyring generated for REPOSITORY_EXTRA_KEYS is 133 | not a keybox 134 | 135 | [ Guillem Jover ] 136 | * [93e8909] Switch from deprecated /var/run to /run 137 | 138 | [ Antoine Musso ] 139 | * [edc8cc9] lintian-junit-report: fix for xunit 2.x Jenkins plugin 140 | 141 | [ parazyd ] 142 | * [b222860] Support building armhf/armel on arm64 without QEMU. 143 | 144 | -- Michael Prokop Wed, 23 Dec 2020 14:24:22 +0100 145 | 146 | jenkins-debian-glue (0.20.1) unstable; urgency=medium 147 | 148 | [ Michael Prokop ] 149 | * [ebb7c31] remove-reprepro-codename: also get rid of package indices 150 | files 151 | * [629746a] perlcritic_tap: properly fail if provided file can't be read 152 | * [aa23145] puppet: ensure puppet/facter from and on Debian works 153 | * [d6c58cf] puppet: fix broken user setup with recent Jenkins versions 154 | * [c79eb15] build-and-provide-package: set ADDITIONAL_BUILDRESULTS also 155 | in custom pbuilderrc 156 | * [75988c6] Bump Standards-Version to 4.4.0 157 | * [ee404c2] build-and-provide-package: ensure to set 158 | ADDITIONAL_BUILDRESULTS from within cowbuilder_run 159 | * [31b9054] pbuilder-hookdir/B90lintian: support execution on source 160 | files + improve error handling 161 | * [a32ac40] puppet: ensure gnupg is present 162 | * [cc328ce] puppet: depend on Trilead API plugin to get working git- 163 | client plugin 164 | 165 | [ Kienan Stewart ] 166 | * [b02b435] Remove usage of SUDO_CMD from generate-reprepro-codename 167 | 168 | [ Victor Seva ] 169 | * [ebdff00] piuparts_wrapper: enable --mirror parameter 170 | 171 | [ Guillem Jover ] 172 | * [18671c6] debian: Namespace debhelper fragment file 173 | * [8d9de8a] Bump Standards-Version to 4.3.0 174 | 175 | [ Cyril Brulebois ] 176 | * [3eee9ba] puppet: fix variables_not_enclosed puppet style warnings 177 | * [a7ca923] puppet: fix double_quoted_strings puppet style warnings 178 | * [06584f4] puppet: fix arrow_alignment puppet style warnings 179 | * [0203f6b] puppet: document wget dependency 180 | * [272709b] puppet: factorize all jenkins::plugin::install's require 181 | attribute 182 | * [ff08c1f] puppet: force bouncycastle-api and junit plugins 183 | 184 | -- Michael Prokop Tue, 19 Nov 2019 15:29:47 +0100 185 | 186 | jenkins-debian-glue (0.20.0) unstable; urgency=medium 187 | 188 | [ Victor Seva ] 189 | * [e2beae5] lintian-junit-report: support processing a 190 | lintian output file 191 | 192 | [ Rémi Palancher ] 193 | * [90ecaab] Ability to add label/version in repos conf 194 | 195 | [ John Goerzen ] 196 | * [d9d9b8f] Allow MIRRORSITE to pass sudo 197 | 198 | [ Antoine Musso ] 199 | * [e336c9e] Add pbuilder hook to run lintian (inside the 200 | target system, using the cowbuiler environment) 201 | 202 | [ Kienan Stewart ] 203 | * [41b7934] Check if reprepro distribution exists 204 | * [dc5dbf5] Use sudo command when grepping for distribution codename 205 | 206 | [ Laurent Declercq ] 207 | * [b63ab9d] Typo in NOTES.org 208 | * [7639edb] Added pbuilder hook to force DPKG unsafe IO (unpack) 209 | 210 | [ Will DeBerry ] 211 | * [4a5093c] autopkg_binary variable needs to always be set 212 | 213 | [ Mykola Malkov ] 214 | * [52f3099] Fix 'skip tests' message for perlcritic test 215 | 216 | [ Michael Prokop ] 217 | * [9ac5ef6] piuparts_wrapper: ensure COMPONENTS variable is unset before 218 | invoking debootstrap 219 | * [726137c] build-and-provide-package: unify identition and logging 220 | message style 221 | * [0b04226] build-and-provide-package: also run generate-reprepro- 222 | codename if reprepro configuration is missing 223 | * [5b8aab8] puppet: ensure we have key available before setting up 224 | sources.list 225 | * [71a21fb] puppet: use openjdk-8-jdk-headless on Ubuntu 18.04 226 | 227 | -- Michael Prokop Tue, 15 Jan 2019 17:49:39 +0100 228 | 229 | jenkins-debian-glue (0.19.0) unstable; urgency=medium 230 | 231 | [ Guillem Jover ] 232 | * [616d23e] Wrap and sort dependency fields 233 | * [d9db869] Switch from Priority extra to optional 234 | * [b9196d5] Remove boilerplate comment from debian/rules 235 | * [dce1238] Add new debian/.gitignore file 236 | * [575728b] Bump debhelper compatibility level to 10 237 | * [cdf1b88] Use the canonical URL for the debian/copyright Format field 238 | * [00602c6] Remove Copyright notice from License field 239 | * [2126ad0] Bump Standards-Version to 4.1.1 240 | 241 | [ Michael Prokop ] 242 | * [3a0a8fa] puppet: ensure recent Jenkins Git client plugin dependencies 243 | are fulfilled 244 | * [3c53ca6] puppet: ensure that apt-transport-https is present 245 | * [3529ae6] piuparts_tap: don't check only for error code 100 but accept 246 | any digit 247 | * [d27375d] puppet: make check for installed packages more reliable. 248 | Thanks to Guillem Jover for feedback and code review 249 | * [e1db6a7] puppet: don't rely on outside variable inside package_check. 250 | Thanks to Alex Lutay 251 | * [9e2117c] Support autopkgtest v5. Thanks to Christoph Berg 252 | for feedback 253 | * [e270387] debian: run wrap-and-sort 254 | * [525467d] build-and-provide-package: explicitly set TERM environment 255 | variable in cowbuilder runs 256 | * [d10af05] Bump Standards-Version to 4.2.1 257 | * [cab6fbf] Adjust lintian-overrides file for new lintian output 258 | behavior 259 | 260 | -- Michael Prokop Tue, 06 Nov 2018 11:07:08 +0100 261 | 262 | jenkins-debian-glue (0.18.4) unstable; urgency=medium 263 | 264 | [ Michael Prokop ] 265 | * [a9ab3f4] puppet: ensure that jenkins + jenkins-debian-glue packages 266 | are installed and only then report a successful run 267 | * [2061ac0] puppet: rework apt-get/apt-key handling to work with recent 268 | puppet versions. Thanks to msqk for reporting on IRC 269 | * [2f939f2] puppet: further changes to work with recent puppet versions 270 | * [c6c8c02] puppet: workspace cleanup plugin depends on further plugins 271 | * [5d02459] tap: avoid deep inspection of scripts by dropping file(1)'s 272 | `--keep-going` option 273 | * [e98da4b] Bump Standards-Version to 4.0.1 274 | 275 | [ klemens ] 276 | * [a3b8324] spelling fix 277 | 278 | -- Michael Prokop Thu, 17 Aug 2017 14:51:57 +0200 279 | 280 | jenkins-debian-glue (0.18.3) experimental; urgency=medium 281 | 282 | The "¡Hola Alicante!" release 283 | 284 | [ Michael Prokop ] 285 | * [6cd165a] deployment: fail if we don't have a FQDN to avoid runtime 286 | errors later on. Thanks to Arthur Lutz for the bugreport 287 | * [16ec0f3] Support SKIP_SOURCE_REMOVAL to not remove source package in 288 | binary only package builds. Thanks to Antoine Delvaux 289 | for the bugreport + initial patch 290 | * [42a7ea8] Support skipping reprepro wrapper via SKIP_REPREPRO_WRAPPER 291 | * [d210c14] Fix regression from commit 8fe677820fae2 to apply safe dpkg- 292 | buildpackage defaults. Thanks to Guillem Jover for feedback and code 293 | review 294 | * [5a7d041] puppet: switch from jenkins-ci.org to jenkins.io. Thanks to 295 | Cyril Brulebois for the hint 296 | * [066a1c0] puppet: no longer run wget with --no-check-certificate 297 | * [12e873d] Further regression fixes for commit 8fe677820fae2 WRT dpkg- 298 | buildpackage options. Thanks to Guillem Jover for feedback and code 299 | review 300 | 301 | [ Victor Seva ] 302 | * [a7b350e] scripts: SIGKILL cannot be trapped 303 | * [b707552] build-and-provide-package: fix trunk_release if 304 | SKIP_REPREPRO_WRAPPER 305 | 306 | -- Michael Prokop Thu, 27 Apr 2017 18:29:07 +0200 307 | 308 | jenkins-debian-glue (0.18.2) unstable; urgency=medium 309 | 310 | [ Will DeBerry ] 311 | * [8fe6778] Don't override filter regexs 312 | 313 | -- Michael Prokop Tue, 24 Jan 2017 22:13:48 +0100 314 | 315 | jenkins-debian-glue (0.18.1) unstable; urgency=medium 316 | 317 | [ André Draszik ] 318 | * jdg-debc: works for foreign architecture packages 319 | * build-and-provide-package: fix a typo wrt freight 320 | * build-and-provide-package: don't create freight dirs unnecessarily 321 | * build-and-provide-package: use mktemp rather than PID for directory 322 | name 323 | * build-and-provide-package: make sure to remove pbuilderrc 324 | 325 | [ Michael Prokop ] 326 | * generate-svn-snapshot: avoid mergeWithUpstream failure with recent 327 | subversion versions 328 | * puppet: ensure display-url-api plugin is installed 329 | * puppet: warn users of automated installations regarding missing 330 | jenkins plugin dependencies 331 | * build-and-provide-package: enable builtin support for eatmydata in 332 | pbuilder 333 | * Include .buildinfo files in list of artifact files. Thanks to 334 | Christoph Berg 335 | * Don't fail when hitting .buildinfo files in reprepro's incoming stage 336 | * Bump debhelper compat version to v9 337 | 338 | -- Michael Prokop Fri, 18 Nov 2016 11:29:55 +0100 339 | 340 | jenkins-debian-glue (0.18.0) unstable; urgency=medium 341 | 342 | [ Michael Prokop ] 343 | * [f9b1fc8] puppet: update list of Jenkis plugins to satisfy 344 | dependencies. Thanks to youam the bug report 345 | * [db59998] puppet: update dependencies for git, ws-cleanup + ssh-agent 346 | Jenkins plugins 347 | * [96fe9fe] puppet: install antisamy-markup-formatter plugin for HTML 348 | markup support 349 | * [16f0ba5] Adjust runtime detection to properly work with LXC hosts. 350 | Thanks to Ondřej Surý 351 | * [59e1a99] Avoid dpkg-architecture usage for identifying host 352 | architecture. Thanks to Guillem Jover for feedback 353 | * [737e4e9] generate-git-snapshot: do not fail with branch specifier 354 | being a commit ID. Thanks to Jan Alexander Steffens 355 | for bugreport + patch 356 | * [0f436f2] Bump Standards-Version to 3.9.8 357 | 358 | [ Antoine Delvaux ] 359 | * [c1e13b9] Adding SKIP_MISSING_BINARY_REMOVAL to prevent removal of 360 | binary packages not belonging to the currently built source package. 361 | 362 | [ Sebastian Damm ] 363 | * [09a78f2] generate-git-snapshot: support DCH_CHANGELOG_FILE to change 364 | path for git-dch 365 | 366 | [ Alexis Bezverkhyy ] 367 | * [6561c54] take into account .udebs in remove_packages() 368 | 369 | -- Michael Prokop Tue, 04 Oct 2016 14:20:23 +0200 370 | 371 | jenkins-debian-glue (0.17.0) unstable; urgency=medium 372 | 373 | [ Michael Prokop ] 374 | * [f33c054] Update copyright information (hello 2016) 375 | * [ea83f07] Support usage of a reprepro wrapper script via REPREPRO_CMD 376 | * [8c422f0] build-and-provide-package: support RELEASE_REPOSITORIES 377 | * [5a6c4d6] Support choosing distribution/codename via 378 | $RELEASE_DISTRIBUTION 379 | * [12a45c5] Vcs-Git header: replace git with more secure https version 380 | * [8e81ada] Bump Standards-Version to 3.9.7 381 | 382 | [ Cyril Brulebois ] 383 | * [d3a0dc3] puppet: end sources.list snippets with newlines. 384 | 385 | [ Adrian Vondendriesch ] 386 | * [a490dbb] Fix permissions of keyring.gpg in D20releaserepo. 387 | 388 | -- Michael Prokop Mon, 14 Mar 2016 21:33:44 +0100 389 | 390 | jenkins-debian-glue (0.16.0) unstable; urgency=medium 391 | 392 | [ Kane ] 393 | * [1e15d10] Allow customization of generated timestamp in package 394 | version 395 | * [59a3171] Add an option for enforcing Git commit in package version 396 | 397 | [ Michael Prokop ] 398 | * [4f81b3e] Support skipping cowbuilder updates via 399 | SKIP_COWBUILDER_UPDATE=true 400 | * [d00f953] reprepro: use --ignore=surprisingbinary to support automatic 401 | debug symbols 402 | * [2614b20] reprepro: processincoming doesn't handle 403 | --ignore=surprisingbinary yet. Thanks to Christoph Berg 404 | (see #808558) 405 | * [0d872a2] pbuilder-hookdir/C10shell: support pbuilder >=0.216 406 | 407 | [ Christian Hofstaedtler ] 408 | * [b07e121] Fix TAP format pep8_tap output 409 | 410 | -- Michael Prokop Thu, 07 Jan 2016 11:11:38 +0100 411 | 412 | jenkins-debian-glue (0.15.2) unstable; urgency=medium 413 | 414 | * [6d02e56] generate-git-snapshot: support git-buildpackage >=0.6.24. 415 | Thanks to Daniele E. Domenichelli for 416 | the bug report (Closes: #799183) 417 | 418 | -- Michael Prokop Thu, 17 Sep 2015 11:41:48 +0200 419 | 420 | jenkins-debian-glue (0.15.1) unstable; urgency=medium 421 | 422 | [ Victor Seva ] 423 | * [129b226] tap_tool_dispatcher: add --file-list option 424 | * [8aa6aab] tap_tool_dispatcher: support BASE_BIN to control location of 425 | *_tap scripts 426 | 427 | [ Michael Prokop ] 428 | * [254809c] tap_tool_dispatcher: fix command line handling for file- 429 | list. Thanks to Victor Seva 430 | * [08710a4] B20autopkgtest: fix order of adt-run tests on command line. 431 | Thanks to Axel Beckert for spotting the issue + 432 | Martin Pitt for helping resolve this issue 433 | 434 | -- Michael Prokop Thu, 10 Sep 2015 22:14:57 +0200 435 | 436 | jenkins-debian-glue (0.15.0) unstable; urgency=medium 437 | 438 | * [220f87e] Support eatmydata (automatically enabled if host + 439 | distribution needs match) + ccache 440 | * [a1cba38] Rename global REPOSITORY to DEFAULT_REPOSITORY to support 441 | overwriting it on demand (Closes #94) Thanks to Jean Baptiste Favre 442 | for the bug report 443 | * [469a1ed] Ensure that eatmydata version on host is recent enough 444 | * [fdd0c85] Use debian-archive-keyring when building for recent Debian 445 | on Ubuntu (Closes #130) 446 | * [89d3400] Update informational message regarding sub-directory 447 | checkout for Git (Closes #107) 448 | 449 | -- Michael Prokop Fri, 28 Aug 2015 16:19:06 +0200 450 | 451 | jenkins-debian-glue (0.14.2) unstable; urgency=medium 452 | 453 | * [a12c01d] Explicitly set umask to avoid running into cowbuilder bug 454 | #531885. Thanks to Christoph Berg 455 | * [a410fbb] Drop /var/cache/pbuilder/build from default bindmounts. 456 | Thanks to Philipp Hahn for the bug report and 457 | analysis 458 | 459 | -- Michael Prokop Thu, 27 Aug 2015 23:29:43 +0200 460 | 461 | jenkins-debian-glue (0.14.1) unstable; urgency=medium 462 | 463 | * [b9b7c13] Get rid of cowbuilder environment if creating it failed 464 | * [3da4c8a] Support disabling specific tap tool checks (Closes #132) 465 | * [d414549] Conflict with old jenkins-debian-glue-buildenv-* to fix 466 | upgrade issues 467 | * [4025da3] Support parallel from moreutils as alternative to GNU 468 | parallel 469 | * [1862af3] Drop jenkins-debian-glue-buildenv-* from Provides 470 | * [e5a39b4] tap_tool_dispatcher: keep existing behaviour by not removing 471 | empty directories 472 | * [38b3c1c] The package is named libperl-critic-perl, not perlcritic. 473 | Thanks to Victor Seva 474 | * [740c8b9] Do not skip dist_and_arch_settings in PROVIDE_ONLY mode 475 | * [4b60635] tap_tool_dispatcher: fix path for checkbashism_tap check 476 | * [9bb89c8] Replace my business mail address with my debian.org one 477 | * [f7235ed] libperl-critic-perl in Depends is unneeded, Recommends is 478 | enough 479 | 480 | -- Michael Prokop Mon, 24 Aug 2015 22:08:32 +0200 481 | 482 | jenkins-debian-glue (0.14.0) unstable; urgency=medium 483 | 484 | The "free the racoons AKA DebConf15" release 485 | 486 | [ Franco (nextime) Lanza ] 487 | * [b9c9cfd] Add pbuilder USENETWORK=yes option also to cowbuilder_run 488 | 489 | [ Michael Prokop ] 490 | * [3d79c45] Support execution of external autopkgtests via ADT=external 491 | + ADT_RUNNER=... Thanks to Alexander Wirt for idea and feedback 492 | * [108abe2] build-and-provide-package: be more specific when selecting 493 | *.dsc + *.changes. Thanks to Christoph Berg for the hint 494 | * [a00c865] Use adt-run's --output-dir option if available. Thanks to 495 | Axel Beckert for the hint 496 | * [f70b5fb] Get rid of unreferenced files in release process 497 | * [026ace2] B20autopkgtest: do not fail build when skipping tests. 498 | Thanks to Jan Alexander Steffens for 499 | reporting 500 | * [9c37df2] Improve parallel build support to not fail with concurrent 501 | update operations. Thanks to Christian Hofstaedtler 502 | for testing + feedback and Victor Seva 503 | for helping with the actual 504 | implementation 505 | * [6446c02] Use /var/run/lock/ for cowbuilder lockfiles to fix 506 | permission issues 507 | * [8e88422] Reduce number of binary packages (Closes #131) Thanks to 508 | Christian Hofstaedtler 509 | * [1a1102c] Update debian/copyright 510 | * [0aebca1] Get rid of generate-reprepro-codename lockfile 511 | * [e9e533c] Get rid of mount bind for autopkgtest (Closes #123) Thanks 512 | to Christoph Berg 513 | 514 | [ Victor Seva ] 515 | * [d27c6c6] tap: add shellcheck support 516 | 517 | [ Walter Kleynscheldt ] 518 | * [0e0dacd] Add override option USE_ORIG_VERSION to keep the changelog 519 | version 520 | 521 | [ Antoine Musso ] 522 | * [ee9d99c] Support muting command printing in shell scripts 523 | 524 | -- Michael Prokop Sat, 22 Aug 2015 12:57:37 +0200 525 | 526 | jenkins-debian-glue (0.13.0) unstable; urgency=medium 527 | 528 | [ Antoine Musso ] 529 | * [17c3778] generate-git-snapshot: replace distribution dashes in 530 | version 531 | 532 | [ Victor Seva ] 533 | * [92ee917] repository_checker: add --version-remove-epoch option 534 | * [9e42ce5] repository_checker: add option to skip packages from validate 535 | * [34094e5] repository_checker: fix 9e42ce57180f5b7 missing $ 536 | 537 | [ Michael Prokop ] 538 | * [5b7c490] generate-svn-snapshot: execute `svn upgrade` only with svn 539 | >=1.7. Thanks to Christian Schneider for 540 | the bug report and initial patch 541 | * [26fee0c] generate-svn-snapshot: always generate changes file. Thanks 542 | to Christian Schneider for the bug report 543 | and patch 544 | * [ba809b2] generate-svn-snapshot: support $SBP_OPTS to control svn- 545 | buildpackage behaviour + add -nc to its default options. Thanks to 546 | Christian Schneider for the patch 547 | * [c50e9f0] generate-svn-snapshot: use UNRELEASED for snapshots builds. 548 | Thanks to Christian Schneider for the 549 | patch 550 | * [7dd7133] generate-svn-snapshot: don't try to sign snapshot build 551 | during release builds. Thanks to Christian Schneider 552 | for the patch 553 | * [ca53ec4] generate-git-snapshot: support overwriting DBP_EXTRA_OPTS + 554 | adjust coding style 555 | * [d0c30f2] Support listing Debian package content via new script jdg- 556 | debc (Closes #119) 557 | 558 | [ Franco (nextime) Lanza / Daniel Reurich ] 559 | * [5cb9bd6] Add git format deb pkgs support thanks to Daniel Reurich for 560 | Devuan 561 | * [9cf2086] Add a per-package way to set USENETWORK=yes to pbuilderrc 562 | 563 | -- Michael Prokop Wed, 03 Jun 2015 14:34:13 +0200 564 | 565 | jenkins-debian-glue (0.12.0) unstable; urgency=medium 566 | 567 | [ Michael Prokop ] 568 | * [9eb6edb] piuparts_tap: check for broken symlinks + installation 569 | errors, provide options to skip checks 570 | * [e2ec2ec] generate-reprepro-codename: avoid endless loop on wrong usage 571 | * [e4e2f7b] adtsummary_tap: support output of recent versions of 572 | autopkgtest 573 | * [b52fc1a] piuparts_wrapper: support setting tmpdir directory 574 | * [ef89da8] Do not remove packages when running through dput wrapper. 575 | Thanks to Yurii Vlasenko 576 | * [f3381b5] Improve and finalize foreign arch build support via qemu- 577 | debootstrap 578 | * [3dd4a13] Support overwriting DEBBUILDOPTS + new variable 579 | FORCE_BINARY_ONLY. Thanks to Franco Lanza for the 580 | initial patch in PR #114 581 | * [74712ff] Support signing source packages via $KEY_ID. Thanks to 582 | Franco Lanza for the inspiration in PR #114 583 | * [6ef2570] Enable COMPONENTS workaround for Ubuntu cowdancer issue only 584 | when building *for* (not *on*) Ubuntu. Thanks to Yurii Vlasenko for 585 | reporting and feedback (gh #113) 586 | * [d9cc2bc] Support ADJUST_DISTRIBUTION_ONTHEFLY to set distribution in 587 | binary builds. Thanks to Yurii Vlasenko for reporting and feedback 588 | 589 | [ Bernhard Miklautz ] 590 | * [1f8d499] generate-git-snapshot: fix typo 591 | * [7e2484a] generate-git-snapshot: combine dch opts 592 | * [c300281] generate-git-snapshot: add DCH_LOG_RESTRICTION 593 | 594 | [ Sylvestre Ledru ] 595 | * [3498d6c] generate-svn-snapshot: always call svn upgrade 596 | 597 | [ Yurii Vlasenko ] 598 | * [fa728cf] added support for uploading using dput 599 | 600 | [ Franco Lanza ] 601 | * [060e227] Added support for binary only build and qemu foreign arch 602 | build 603 | 604 | -- Michael Prokop Thu, 09 Apr 2015 12:02:23 +0200 605 | 606 | jenkins-debian-glue (0.11.0) unstable; urgency=medium 607 | 608 | [ Christian Hofstaedtler ] 609 | * [73593ab] checkbashism_tap: ignore non-shell-script files 610 | 611 | [ Michael Prokop ] 612 | * [98632ac] Bring .mailmap up2date, incl. usage instructions 613 | * [6b282e0] build-and-provide-package: support skipping binary removal 614 | via SKIP_BINARY_REMOVAL=true 615 | * [ad174b4] build-and-provide-package: fix broken SKIP_BINARY_REMOVAL 616 | test. Thanks to Christian Hofstaedtler 617 | for the bug report 618 | * [017756f] generate-git-snapshot: support $SKIP_BRANCH_AND_TAG_HANDLING 619 | and detect Gerrit pushes 620 | * [b0acd6c] Support Gerrit integration without direct connection to 621 | Gerrit events 622 | * [4c5d644] puppet: support Google Computer Engine 623 | * [30fd6bb] Gerrit support: assume *-source job gets triggered with full 624 | gerrit params 625 | * [bad7831] build-and-provide-package: drop unused base_version handling 626 | * [f9b9c84] build-and-provide-package: support setting custom reprepro 627 | options via REPREPRO_OPTS 628 | * [4404d28] Bump Standards-Version to 3.9.6 629 | 630 | [ Mathieu Parent ] 631 | * [2934b08] Ensure correct version comparison 632 | 633 | -- Michael Prokop Mon, 20 Oct 2014 10:13:18 +0200 634 | 635 | jenkins-debian-glue (0.10.0) unstable; urgency=medium 636 | 637 | The "have fun with pep8 checks" release 638 | 639 | [ Michael Prokop ] 640 | * [ed2b47a] New script pep8_tap to check python code via pep8 641 | * [f9cfb58] Recommends pep8 >= 1.4.6~ as we depend on its '--format' 642 | option 643 | * [e4172ea] generate-git-snapshot: fail if git-dch doesn't support 644 | --distribution but $DIST is set 645 | * [99353c1] jenkins-debian-glue-buildenv-taptools: it's libperl-critic- 646 | perl, not perlcritic 647 | * [0767dd5] pep8_tap: adjust Encoding handling for ruby1.8 648 | * [a1f0576] Fix script name of pep8_tap 649 | * [cea1830] pep8_tap: further fix for encoding issue with ruby1.8 650 | * [b756c64] Clarify Depends/Recommends of jenkins-debian-glue-buildenv- 651 | taptools 652 | 653 | [ Christian Hofstaedtler ] 654 | * [cfdec26] Allow overriding the source package dist 655 | * [22ac5fa] Install pep8_tap tool 656 | * [1f796f0] pep8_tap: improve formatting 657 | * [325f1dd] pep8_tap: fix counter 658 | * [5dc4fe0] pep8_tap: Fix crash with invalid encoded source data 659 | * [870f61a] pep8_tap: ignore non-Python files 660 | * [f9a139d] tap_tool_dispatcher: run all tools in parallel 661 | * [5d33d21] pep8_tap: don't re-enable default-disabled checkers 662 | 663 | -- Michael Prokop Wed, 04 Jun 2014 16:56:34 +0200 664 | 665 | jenkins-debian-glue (0.9.0) unstable; urgency=medium 666 | 667 | The "lunch break" release 668 | 669 | [ Patrick Schoenfeld ] 670 | * [08248d6] Pass DIST and ARCH to cowbuilder call 671 | 672 | [ Edwin Fine ] 673 | * [29611c6] Empty 'distribution' and 'architecture' env vars now do not 674 | break script when calling cowbuilder. 675 | 676 | [ Michael Prokop ] 677 | * [e116dbb] puppet: allow DIST + ARCH in sudo configuration 678 | * [dbdea39] generate-git-snapshot: Support PRE_DCH_HOOK variable for 679 | custom scripts. Thanks to Rudolph Bott for the patch 680 | * [811aef7] debian/copyright: fix Upstream-Name header 681 | * [36cca60] Support skipping adt tests by setting ADT=skip. Thanks to 682 | Christoph Berg 683 | * [4020157] lintian-junit-report: do not use "--" as option separator 684 | * [757c0cc] Adjust Recommends for REPOSITORY_EXTRA feature + minor style 685 | improvements 686 | * [578bb8d] puppet: Enable "Raw HTML" option and move systemMessage into 687 | View 688 | * [ac5dd5b] Bump Dependency on openjdk-6-jre-headless to openjdk-7-jre- 689 | headless 690 | 691 | [ Jean Baptiste Favre ] 692 | * [a9ab5cc] No need to source /etc/jenkins/debian-glue twice in the same 693 | script 694 | 695 | [ Lukas Anzinger ] 696 | * [b37d310] generate-reprepro-codename: Accept origin and suite as 697 | command line arguments. 698 | 699 | [ Mathieu Parent ] 700 | * [4c329b3] Don't use --git-export-dir 701 | 702 | [ Andrey Elmanov ] 703 | * [0a4191c] Allow adding extra repositories for resolving dependencies 704 | 705 | -- Michael Prokop Fri, 16 May 2014 12:56:48 +0200 706 | 707 | jenkins-debian-glue (0.8.1) unstable; urgency=medium 708 | 709 | * [01b8a46] Revert "build-and-provide-package: use -b for package builds 710 | that shouldn't include sources" [Closes: #88] Thanks to Christoph Berg 711 | for feedback 712 | 713 | -- Michael Prokop Fri, 14 Feb 2014 10:58:19 +0100 714 | 715 | jenkins-debian-glue (0.8.0) unstable; urgency=medium 716 | 717 | The "happy fosdem" release. 718 | 719 | [ Michael Prokop ] 720 | * [68f0960] generate-reprepro-codename: refer to 721 | /etc/jenkins/debian_glue 722 | * [14f3559] Lock access to conf/incoming file 723 | * [003fe99] build-and-provide-package: get rid of dependency on dcmd 724 | * [f618f4d] Rework new gbp.conf handling 725 | * [cbe7f6f] Provide yaml setup files for usage with jenkins-job-builder 726 | * [e19a25e] freight: support sudo for creating directories/conffile, 727 | extend config, quote all variables 728 | * [a68c8c8] jjb: adjust lintian call for binary job + make 729 | repository_checker dynamic 730 | * [21a4d4c] Provide simple gateway service between GitHub + (internal) 731 | Jenkins system 732 | * [ced37f6] Add fakeroot to Depends 733 | * [a7e01d3] generate-*-snapshot: provide user friendly error message if 734 | debian/changelog is missing 735 | * [b231c3e] generate-reprepro-codename: lock access to 736 | conf/distributions 737 | * [534e761] puppet: install ttf-dejavu package to fix java headless 738 | issue 739 | * [8da4508] puppet: install timestamper plugin 740 | * [649c708] build-and-provide-package: use -b for package builds that 741 | shouldn't include sources 742 | * [c98acbf] Bump Standards-Version to 3.9.5 743 | 744 | [ Antoine Musso ] 745 | * [6bf804a] piuparts_wrapper: only expand scriptsdir when it is set 746 | 747 | [ Carl Fürstenberg ] 748 | * [9d5366f] Allow debian-glue to read gbp.conf 749 | 750 | [ Lukas Anzinger ] 751 | * [be40e3c] Don't include sources in sources.list, they're not needed 752 | for building 753 | * [4fa841e] The given $REPOS variable may also point to a suite, not 754 | only a codename 755 | * [4ab1301] Dynamically parse list of components from Release file 756 | * [b1e42c1] Make it possible to verify our own reprepro repositories by 757 | providing a pubkey 758 | 759 | -- Michael Prokop Mon, 03 Feb 2014 14:51:01 +0100 760 | 761 | jenkins-debian-glue (0.7.1) unstable; urgency=low 762 | 763 | * [80057b0] Drop jenkins-debian-glue-repoenv package + add dependency on 764 | "reprepro | freight" to jenkins-debian-glue instead 765 | * [7588e3e] Add jenkins-debian-glue-buildenv-git to Recommends 766 | 767 | -- Michael Prokop Thu, 24 Oct 2013 13:42:46 +0200 768 | 769 | jenkins-debian-glue (0.7.0) unstable; urgency=low 770 | 771 | The "I told you so" release ¯\_(ツ)_/¯ 772 | 773 | [ Michael Prokop ] 774 | * New features: 775 | - [73ccc32] New script remove-reprepro-codename (misc further 776 | improvements and additions in [123fed8] [723e5db] [bdc0a0d]) 777 | - [5930014] Support keeping the build environment via DEB_KEEP_BUILD_ENV 778 | - [1237b99] Support providing a custom pbuilder configuration file via 779 | PBUILDER_CONFIG 780 | - [e5225b1] piuparts_wrapper: support setting custom debootstrap options 781 | via DEBOOTSTRAP_OPTIONS 782 | - [6d197dd] Support POST_BUILD_HOOK at the end of the build process 783 | 784 | * Misc improvements and bugfixes: 785 | - [d1e90b2] piuparts_wrapper: make sure we have the sbin directories in 786 | our PATH 787 | - [512eb37] generate-git-snapshot: explicitly check for beginning of 788 | line when retrieving version information 789 | - [8cac20f] Provide basic project information via README.md 790 | - [976acb9] Adjust debian/docs for README rename 791 | - [3b12d46] Make lintian-junit-report ruby 1.8 safe 792 | - [63d6c47] Rework generate-git-snapshot to make sure quilt can't break 793 | the build. Thanks to Raphael Hertzog for his dpkg 794 | related feedback 795 | - [d759c0d] Remove *_source.changes file generated by dpkg-buildpackage 796 | in --source job 797 | - [5d465bf] build-and-provide-package: Look only for the "real" 798 | debian/control file. Thanks to Christoph Berg for the bugreport and fix 799 | - [ab03545] generate-*-snapshot: provide hint if the 'source' directory 800 | hasn't been configured 801 | - [9d3a3d4] Make sure to also support linux-any as valid Architecture 802 | field. Thanks to Jean Baptiste Favre 803 | - [f02f0e1] Add jenkins-debian-glue-repoenv to Recommends and default 804 | installation list 805 | - [acd1257] Drop trailing dot in package descriptions of 806 | jenkins-debian-glue-{repoenv,buildenv} 807 | 808 | * Puppet related changes: 809 | - [c73c341] install git-client plugin explicitly in version 1.1.2 810 | - [fd1ce1f] support forcing plugin installation allowing us to 811 | install latest git-client plugin 812 | - [68578ef] install scm-api plugin, required for git plugin 813 | 814 | [ Calvin Walton ] 815 | * [9ac44d1] cd to workspace in generate-git-snapshot when running 816 | dpkg-source 817 | 818 | [ Sylvestre Ledru ] 819 | * [105fa47] PRE_SOURCE_HOOK handling in generate-*-snapshot scripts: 820 | match behaviour and do not test if file exits 821 | 822 | [ Sławomir Bocheński ] 823 | * lintian-junit-report related changes: 824 | - [21b8527] Allow passing options to lintian 825 | - [7a974f4] Accept multiple file arguments 826 | - [536c2a4] Convert output to XML after parsing 827 | - [c491fd8] Simplify matching error/warning lines 828 | - [af173af] Name test cases after lintian tags 829 | - [6667cda] Split lintian output between test cases 830 | - [ee33f72] Fix reported total time for TCs 831 | - [a4bb3b1] Use REXML to generate XML output 832 | - [b6d83d6] Support for marking tests skipped 833 | * [f10fdda] Create .mailmap 834 | 835 | [ Ulrich Dangel ] 836 | * [fe363dd] lintian-junit-report: quote XML strings 837 | 838 | [ Edwin Fine ] 839 | * [ac7d608] Add support for user-defined BINDMOUNTs 840 | * [321b149] Force local apt repos to be trusted 841 | 842 | [ Yoann Dubreuil ] 843 | * [600499e] Speed up pbuilder: disable building of manual 844 | pages with a hook script 845 | * [8d10e82] Add execute permissions to D10-man-db 846 | 847 | [ Antoine Musso ] 848 | * [841b4b2] piuparts_wrapper: quote scriptsdir in piuparts cmd 849 | * [08b9a5d] piuparts_wrapper: unset scripts dir when non existent 850 | 851 | [ Bernhard Miklautz ] 852 | * [8893a6f] Added a virtual package for repo only slaves 853 | (jenkins-debian-glue-repoenv, and jenkins-debian-glue-repoenv 854 | for build environments without repository) 855 | 856 | -- Michael Prokop Wed, 23 Oct 2013 20:32:29 +0200 857 | 858 | jenkins-debian-glue (0.6.0) unstable; urgency=low 859 | 860 | The "nothing is better than a children's smile" release /人◕‿◕人\ 861 | 862 | [ Michael Prokop ] 863 | * Feature related changes: 864 | - [55709c2] build-and-provide-package: new variable SKIP_PACKAGE_FROM_REMOVAL 865 | to skip specific packages from removal [Closes gh#50] 866 | 867 | * Bugfix related changes: 868 | - [fdb9b22] Depend on subversion-tools (<= 1.6.18dfsg-1) *or* svn2cl 869 | - [ede0fb0] generate-git-snapshot: force switching back to previous 870 | branch 871 | - [00d1e85] generate-reprepro-codename: do not fail build if chown of 872 | reprepro conf fails [Closes gh#53] 873 | - [694b926] generate-*-snapshot: do not fail if PRE_SOURCE_HOOK is unset 874 | - [1f211d5] generate-git-snapshot: use --git-ignore-branch as default 875 | build option for gbp [Closes gh#47] 876 | - [7a573b8] build-and-provide-package: do not fail if 877 | REMOVE_FROM_RELEASE is unset 878 | - [db1bb37] jenkins_debian_glue.pp: depend on default-jre-headless 879 | package. Thanks to Cyril Brulebois for the bug report 880 | - [bd6d573] piuparts_tap: explicitly set Encoding::UTF_8 for Ruby 1.9. 881 | Thanks to Christian Hofstaedtler for feedback 882 | 883 | * Deployment related changes: 884 | - [b75a45e] provide fallback for EC2 IP retrieval 885 | - [7495221] install git-client plugin by default 886 | - [b098b7c] allow DEB_* environment variables in sudo configuration 887 | - [b4e73e0] use wget instead of curl as fallback for public IP retrieval 888 | - [35e87f9] do not install xunit plugin by default. 889 | Thanks to Sylvestre Ledru 890 | - [5d84958] limit amount of retries for wget-ing EC2 info to 3 891 | - [1f7226d] update CopyArtifact configuration 892 | 893 | * Misc changes: 894 | - [fedc856] Ship examples/debian_glue as /etc/jenkins/debian_glue 895 | default configuration file [Closes: gh#49] 896 | - [1cb24b3] piuparts_wrapper: run with --scriptsdir=/etc/piuparts/scripts/ 897 | by default. Thanks to Holger Levsen for the hint 898 | - [6e8f6df] invoke 'reprepro include' cmdline with --ignore=uploaders. 899 | Thanks to anarcat for the bug report and suggestion [Closes: gh#36] 900 | - [83e779a] generate-reprepro-codename: drop default 901 | DebIndices/DscIndices settings. Thanks to anarcat for the bug report 902 | and suggestion 903 | - [8f33c0c] generate-reprepro-codename: drop AlsoAcceptFor default 904 | setting. Thanks to anarcat 905 | 906 | [ Stanislav Bogatyrev ] 907 | * [2cf5563] Use release repo for all builds with same release parameter. 908 | 909 | [ Antoine Beaupré ] 910 | * [6faa90d] use a more sensible default for DEBEMAIL 911 | 912 | [ Sylvestre Ledru ] 913 | * [521e0cf] Add the management of a PRE_SOURCE_HOOK variable. If set, 914 | the script pointed by PRE_SOURCE_HOOK will be executed before the .dsc 915 | creation 916 | 917 | [ Patrick Schoenfeld ] 918 | * [2a8b22e] Allow removal of packages from releases 919 | * [586207e] Bugfix: Make dpkg-source ignore .git in more cases 920 | 921 | [ Slawomir Bochenski ] 922 | * [d98f440] Change timestamp format used in version string 923 | 924 | -- Michael Prokop Mon, 10 Jun 2013 23:26:58 +0200 925 | 926 | jenkins-debian-glue (0.5.0) unstable; urgency=low 927 | 928 | [ Michael Prokop ] 929 | * [00dc44d] piuparts_wrapper: use --skip-logrotatefiles-test if 930 | available 931 | * [fd81e82] git post-receive hook: use $server variable instead of 932 | jenkins.grml.org 933 | * [de10cec] git post-receive hook: provide curl usage example 934 | * [f6a3ab9] generate-git-snapshot: use dpkg-source's -I switch without 935 | any arguments. Thanks to yanfalies for the bugreport 936 | * [ea73944] replace signal numbers in trap with their according signal 937 | names 938 | * [11fd8db] Drop "possible bashism" from source/git/post-receive 939 | * [e814cfe] tap_tool_dispatcher: ignore .git directory as well 940 | * [b56f16b] tap_tool_dispatcher: use .tap suffix for output files 941 | * [85a8250] generate-git-snapshot: make sure we're building the 942 | requested version via dpkg-source 943 | * [1418a32] generate-git-snapshot: support $branch as alternative to 944 | $tag 945 | * [7f55630] refactor generate-git-snapshot 946 | * [f5852ad] Update copyright information in LICENSE file 947 | * [95a35fe] support autopkgtest 948 | * [747fda3] generate-git-snapshot: prepend "origin" when checking out a 949 | $branch. Thanks to Stefan Schlesinger for the bug report 950 | and testing 951 | * [e240dcc] Support configuration of release repository via 952 | $RELEASE_REPOSITORY. Thanks to Marcel Beck for 953 | the initial patch in pull-request 34 which triggered development of 954 | this feature 955 | * [6b1e196] Provide configuration example for REPOSITORY in default 956 | config 957 | * [b690dbb] Bump Standards-Version to 3.9.4 958 | 959 | [ Yury Vidineev ] 960 | * [09cfda3] Depends of sudo or sudo-ldap 961 | 962 | [ Marcelo Martins ] 963 | * [015b2fb] Added a variable to also allow one to overwrite the git- 964 | buildpackage options. If variable not set it just falls back to the 965 | original options. 966 | 967 | [ Marcel Beck ] 968 | * [bd87c78] Do not checkout HEAD, checkout the Branch that is given in 969 | jenkins 970 | 971 | [ Stefan Schlesinger ] 972 | * [42cb68c] Adding freight support to build-and-provide-package 973 | 974 | [ Stanislav Bogatyrev ] 975 | * [8abadb7] Add UDebComponents. Needed by some packages. 976 | 977 | -- Michael Prokop Tue, 05 Feb 2013 14:18:43 +0100 978 | 979 | jenkins-debian-glue (0.4.0) unstable; urgency=low 980 | 981 | The "upgrade tests ftw" release /人◕‿◕人\ 982 | 983 | [ Patrick Schoenfeld ] 984 | * [201ec1e] generate-git-snapshot: Allow skipping of git-dch 985 | 986 | [ Michael Prokop ] 987 | * New features: 988 | - [abc1949] New package jenkins-debian-glue-buildenv-taptools 989 | - [87bb207] Initial piuparts support with new package 990 | jenkins-debian-glue-buildenv-piuparts 991 | * Minor updates: 992 | - [3872b18] generate-git-snapshot: Do not fail if SKIP_DCH is 993 | unset; use 'true' for checking for SKIP_DCH; inform user about it 994 | * Puppet deployment: 995 | - [714c019] apply.sh: use ";" as separator in sed cmdline as 996 | hash string might contain "/" 997 | - [67bdc6e] deploy jenkins-debian-glue-buildenv-taptools + 998 | jenkins-debian-glue-buildenv-piuparts 999 | - [b8cf4a5] enable piuparts, debootstrap + piuparts_wrapper in 1000 | /etc/sudoers.d/jenkins 1001 | - [b2c0c83] deploy TAP Jenkins plugin 1002 | - [cd2bcf9] provide description in *-source and *-binaries job, 1003 | including how to access the repos 1004 | - [647ebb0] provide jenkins-debian-glue-piuparts Jenkins job 1005 | 1006 | -- Michael Prokop Fri, 31 Aug 2012 15:07:13 +0200 1007 | 1008 | jenkins-debian-glue (0.3.0) unstable; urgency=low 1009 | 1010 | The "Le prénom" release 1011 | 1012 | * [f85d9b4] deployment: ship /var/lib/jenkins/config.xml and user 1013 | jenkins-debian-glue with custom password 1014 | * [377d53a] Add support for JUnit reports via lintian in automated 1015 | deployment 1016 | * [ff72534] README: drop docs, point to http://jenkins-debian-glue.org/ 1017 | * [2a13a53] Drop img/ (provided through website now) 1018 | * [e901557] Use seed for password hashing. Thanks to Peter Palfrader 1019 | for bringing this up while reviewing the script 1020 | * [3b1e604] repository_checker: support --validate-incoming 1021 | * [65dbf08] Do not modify debian/changelog if building from a tag 1022 | * [465be62] run reprepro's processincoming cmdline also with 1023 | --ignore=wrongdistribution + --waitforlock option. Thanks to Axel 1024 | Beckert for the hint 1025 | * [76e101f] incoming repos: allow all kinds of distributions listed in 1026 | packages enter the repos. Thanks to Bernhard R. Link 1027 | for the hint regarding "Default:" 1028 | * [daecb07] Drop sudo wrappers for release repositories 1029 | * [0f87451] incoming repos: use release name as Default 1030 | * [69e6730] puppet: build master branch in jenkins-debian-glue-source 1031 | 1032 | -- Michael Prokop Tue, 21 Aug 2012 20:44:23 +0200 1033 | 1034 | jenkins-debian-glue (0.2.0) unstable; urgency=low 1035 | 1036 | The "wisdom tooth removal" release ٩(͡๏̯͡๏)۶ 1037 | 1038 | [ Michael Prokop ] 1039 | * Bugfix related changes: 1040 | - [9fdd9fd] Check out temporary branch based on GIT_COMMIT to make 1041 | git-dch happy 1042 | - [3a304b1] create_local_branch: make check for remotes/origin/$BRANCH 1043 | more explicit. Thanks to Axel Beckert 1044 | - [672aa36] Also remove source package from REPOS 1045 | - [57ba7e0] Set ARCH/BASE/DIST in dist_and_arch_settings() also for 1046 | PROVIDE_ONLY runs 1047 | - [de56110] remove_missing_binary_packages: make check for missing 1048 | package match whole words 1049 | - [a00449e] Enable cowbuilder_run() for all architectures 1050 | - [a12b28a] Always include $distribution in cow base name [closes #17] 1051 | Thanks to Christoph Berg for the suggestion 1052 | - [456305e] Call generate-reprepro-codename in reprepro_wrapper + update 1053 | README accordingly. Thanks to Christoph Berg for 1054 | idea + patch 1055 | - [7903737] Invoke all generate-reprepro-codename commands through 1056 | $SUDO_CMD 1057 | 1058 | * Major changes: 1059 | - [f68b0fe] Drop userContent support 1060 | - [24ad13f] Drop $sources support and default with $BASE_PATH to 1061 | $WORKSPACE 1062 | - [8279e90] Drop the deprecated scripts generate-local-repository + 1063 | include-in-repos 1064 | 1065 | * New features: 1066 | - [2593cc8] trigger_jenkins: support sending tags to a release dashboard 1067 | + iterate over all modified projects 1068 | - [d1b43a7] include-in-repos: allow overwriting $BASE_DIR, default to 1069 | working directory 1070 | - [96f3cb6] Support overriding cowbuilder's base.cow via COWBUILDER_BASE 1071 | and refactor code 1072 | - [f6550e9] New script repository_checker 1073 | - [c37a20a] Install repository_checker in jenkins-debian-glue package 1074 | - [c27e896] Add official Ubuntu support 1075 | - [6b43ea6] Initial deployment script + puppet recipe for automatic 1076 | installation 1077 | - [af494a8] Adjust path of puppet file for master branch 1078 | - [33b4195] Puppet deployment script: support EC2 by returning its 1079 | public IP address 1080 | 1081 | * Minor updates: 1082 | - [d236f1a] Do not use Grml-specific defaults for DEBEMAIL and 1083 | generate-local-repository's Release file 1084 | - [a271c48] Do not execute dist_and_arch_settings() if PROVIDE_ONLY 1085 | is set 1086 | - [dd3c1db] Adjust identify_sourcefile to not mention ArtifactDeployer 1087 | any longer 1088 | - [20ef6f3] Apply wrap-and-sort on Debian package 1089 | - [3e55f3e] debian package description: fix typo 1090 | - [043002d] Execute wrap-and-sort with -a option to wrap all 1091 | {Build-,}Depends 1092 | - [0c2a33e] Limit package removal of binary packages to .deb files only 1093 | - [101fb3b] Source /etc/jenkins/debian_glue in generate-*-snapshot 1094 | 1095 | * Documentation related changes: 1096 | - [00ccf25] Update list of contributors 1097 | - [f1f3d78] Update list of Known TODOs 1098 | - [14e8b79] Mention Debian packages 1099 | - [c2f8835] Document how to find console output of Jenkins jobs 1100 | - [0f3b985] Clarify best practices, current development + cover 1101 | some FAQs, closes #9 1102 | - [9c52b4b] Minor syntax fixes and rewordings 1103 | - [1bcac3d] Document COWBUILDER_BASE and COWBUILDER_DIST 1104 | - [0c907e0] Mention the "Delete workspace before build starts" 1105 | option for the binary job 1106 | 1107 | [ Christoph Berg ] 1108 | * [06be70c] Update svn setup instructions. 1109 | * [6f21ae0] Remove duplicate signal from trap call. 1110 | * [757ce4a] Add a workaround for SOURCE_PACKAGE 1111 | * [8a8c98c] Reset current directory in identify_build_type 1112 | * [0893665] Remove a stray newline in README.org. 1113 | 1114 | [ Axel Beckert ] 1115 | * [fc8638f] git-buildpackage refuse to operate on a single git commit, 1116 | too 1117 | * [aaa1298] Fix README about DCH_OPTS and DCH_EXTRA_OPTS 1118 | * [f144899] arch:all packages don't need ${shlibs:Depends} 1119 | 1120 | -- Michael Prokop Sat, 18 Aug 2012 13:33:23 +0200 1121 | 1122 | jenkins-debian-glue (0.1.1) unstable; urgency=low 1123 | 1124 | * [8092cc5] generate-git-snapshot: use git-dch's auto mode as default 1125 | * [e35e50e] generate-git-snapshot: do not checkout branch but always 1126 | $GIT_COMMIT 1127 | * [644aef6] generate-git-snapshot: use plain dch if handling UNRELEASED 1128 | version 1129 | 1130 | -- Michael Prokop Thu, 26 Jul 2012 14:09:51 +0200 1131 | 1132 | jenkins-debian-glue (0.1.0) unstable; urgency=low 1133 | 1134 | * Initial release. 1135 | 1136 | -- Michael Prokop Wed, 25 Jul 2012 17:32:53 +0200 1137 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: jenkins-debian-glue 2 | Section: admin 3 | Priority: optional 4 | Maintainer: Michael Prokop 5 | Standards-Version: 4.7.2 6 | Homepage: https://github.com/mika/jenkins-debian-glue 7 | Vcs-Git: https://github.com/mika/jenkins-debian-glue.git 8 | Vcs-Browser: https://github.com/mika/jenkins-debian-glue 9 | Build-Depends: 10 | debhelper-compat (= 12), 11 | ruby , 12 | shunit2 , 13 | 14 | Package: jenkins-debian-glue 15 | Architecture: all 16 | Depends: 17 | sudo | sudo-ldap, 18 | ${misc:Depends}, 19 | Recommends: 20 | jenkins-debian-glue-buildenv, 21 | Conflicts: 22 | jenkins-debian-glue-buildenv-git, 23 | jenkins-debian-glue-buildenv-lintian, 24 | jenkins-debian-glue-buildenv-piuparts, 25 | jenkins-debian-glue-buildenv-slave, 26 | jenkins-debian-glue-buildenv-svn, 27 | jenkins-debian-glue-buildenv-taptools, 28 | Description: Jenkins Debian glue scripts 29 | This package provides scripts which make building Debian 30 | packages inside Jenkins (a Continuous Integration suite) easier. 31 | . 32 | It's meant to make Q/A builds of Debian packages inside Jenkins 33 | as manageable and homogeneous as possible. 34 | . 35 | You need to install the according packaging tools, depending on 36 | your VCS type and the features you want to use. To get all tools 37 | you can just install the jenkins-debian-glue-buildenv package. 38 | 39 | Package: jenkins-debian-glue-buildenv 40 | Architecture: all 41 | Depends: 42 | build-essential, 43 | cowbuilder, 44 | devscripts, 45 | dpkg-dev, 46 | eatmydata, 47 | fakeroot, 48 | file, 49 | git-buildpackage, 50 | gnupg, 51 | jenkins-debian-glue, 52 | lintian, 53 | parallel | moreutils, 54 | piuparts, 55 | pristine-tar, 56 | quilt, 57 | reprepro | freight, 58 | rsync, 59 | ruby, 60 | subversion-tools (<= 1.6.18dfsg-1) | svn2cl, 61 | ${misc:Depends}, 62 | Conflicts: 63 | jenkins-debian-glue-buildenv-git, 64 | jenkins-debian-glue-buildenv-lintian, 65 | jenkins-debian-glue-buildenv-piuparts, 66 | jenkins-debian-glue-buildenv-slave, 67 | jenkins-debian-glue-buildenv-svn, 68 | jenkins-debian-glue-buildenv-taptools, 69 | Replaces: 70 | jenkins-debian-glue-buildenv-git, 71 | jenkins-debian-glue-buildenv-lintian, 72 | jenkins-debian-glue-buildenv-piuparts, 73 | jenkins-debian-glue-buildenv-slave, 74 | jenkins-debian-glue-buildenv-svn, 75 | jenkins-debian-glue-buildenv-taptools, 76 | Recommends: 77 | curl, 78 | libperl-critic-perl, 79 | pycodestyle, 80 | qemu-user-static, 81 | shellcheck, 82 | Description: Jenkins Debian glue scripts - dependency package 83 | This package depends on all Debian packaging/repository 84 | management and VCS tools which may be used with 85 | jenkins-debian-glue for easier installation. 86 | . 87 | If disk space is a concern consider installing only the subset 88 | of packages you actually need. 89 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: jenkins-debian-glue 3 | Source: https://github.com/mika/jenkins-debian-glue 4 | 5 | Files: * 6 | Copyright: 2011-2016 Michael Prokop 7 | License: MIT 8 | 9 | Files: debian/* 10 | Copyright: 2011-2016 Michael Prokop 11 | License: MIT 12 | 13 | Files: pbuilder-hookdir/B20autopkgtest 14 | Copyright: 2012 Christoph Berg 15 | 2013-2015 Michael Prokop 16 | License: MIT 17 | 18 | License: MIT 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | . 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | . 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | -------------------------------------------------------------------------------- /debian/jenkins-debian-glue.docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /debian/jenkins-debian-glue.install: -------------------------------------------------------------------------------- 1 | usr/bin/jdg-build-and-provide-package usr/bin/ 2 | usr/bin/jdg-debc usr/bin/ 3 | usr/bin/jdg-generate-git-snapshot usr/bin/ 4 | usr/bin/jdg-generate-reprepro-codename usr/bin/ 5 | usr/bin/jdg-generate-svn-snapshot usr/bin/ 6 | usr/bin/jdg-increase-version-number usr/bin/ 7 | usr/bin/jdg-lintian-junit-report usr/bin/ 8 | usr/bin/jdg-piuparts-wrapper usr/bin/ 9 | usr/bin/jdg-remove-reprepro-codename usr/bin/ 10 | usr/bin/jdg-repository-checker usr/bin/ 11 | usr/bin/jdg-tap-adtsummary usr/bin/ 12 | usr/bin/jdg-tap-checkbashism usr/bin/ 13 | usr/bin/jdg-tap-merge-conflict usr/bin 14 | usr/bin/jdg-tap-pep8 usr/bin/ 15 | usr/bin/jdg-tap-perlcritic usr/bin/ 16 | usr/bin/jdg-tap-piuparts usr/bin/ 17 | usr/bin/jdg-tap-shellcheck usr/bin/ 18 | usr/bin/jdg-tap-tool-dispatcher usr/bin/ 19 | usr/share/jenkins-debian-glue/examples/debian_glue etc/jenkins/ 20 | usr/share/jenkins-debian-glue/pbuilder-hookdir/ usr/share/jenkins-debian-glue/ 21 | -------------------------------------------------------------------------------- /debian/jenkins-debian-glue.links: -------------------------------------------------------------------------------- 1 | usr/bin/jdg-build-and-provide-package usr/bin/build-and-provide-package 2 | usr/bin/jdg-generate-git-snapshot usr/bin/generate-git-snapshot 3 | usr/bin/jdg-generate-reprepro-codename usr/bin/generate-reprepro-codename 4 | usr/bin/jdg-generate-svn-snapshot usr/bin/generate-svn-snapshot 5 | usr/bin/jdg-increase-version-number usr/bin/increase-version-number 6 | usr/bin/jdg-lintian-junit-report usr/bin/lintian-junit-report 7 | usr/bin/jdg-piuparts-wrapper usr/bin/piuparts_wrapper 8 | usr/bin/jdg-remove-reprepro-codename usr/bin/remove-reprepro-codename 9 | usr/bin/jdg-repository-checker usr/bin/repository_checker 10 | usr/bin/jdg-tap-adtsummary usr/bin/adtsummary_tap 11 | usr/bin/jdg-tap-checkbashism usr/bin/checkbashism_tap 12 | usr/bin/jdg-tap-pep8 usr/bin/pep8_tap 13 | usr/bin/jdg-tap-perlcritic usr/bin/perlcritic_tap 14 | usr/bin/jdg-tap-piuparts usr/bin/piuparts_tap 15 | usr/bin/jdg-tap-shellcheck usr/bin/shellcheck_tap 16 | usr/bin/jdg-tap-tool-dispatcher usr/bin/tap_tool_dispatcher 17 | -------------------------------------------------------------------------------- /debian/jenkins-debian-glue.lintian-overrides: -------------------------------------------------------------------------------- 1 | jenkins-debian-glue: ruby-script-but-no-ruby-dep *jdg-* 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | # Uncomment this to turn on verbose mode. 5 | # export DH_VERBOSE=1 6 | 7 | %: 8 | dh $@ 9 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /examples/debian_glue: -------------------------------------------------------------------------------- 1 | # Example configuration file for the jenkins-debian-glue software. 2 | # Install this file as /etc/jenkins/debian_glue to enable it. 3 | 4 | # Set GnuPG ID that should be used for signing the reprepro repository. 5 | # If you build packages for Squeeze your reprepro repositories *MUST* be 6 | # signed and the keyring that holds the public key (REPOSITORY_KEYRING) 7 | # must be set. 8 | # Expected format: DEADBEEF 9 | # KEY_ID= 10 | 11 | # If TRUNK_RELEASE is set then the package(s) of the repository 12 | # receiving the packages that are built will be copied to the 13 | # repository specified in TRUNK_RELEASE. This provides the option 14 | # to have all recent versions of packages in a central repository. 15 | # TRUNK_RELEASE='release-trunk' 16 | 17 | # If packages are build for more than one architecture you can 18 | # decide which architecture should build the "Architecture: all" 19 | # packages. On all other architectures only the arch specific 20 | # packages will be build then. 21 | # If unset it will default to the architecture of the host system. 22 | # MAIN_ARCHITECTURE="amd64" 23 | 24 | # Hook scripts for pbuilder/cowbuilder, used e.g. for autopkgtest. 25 | # Default: 26 | # PBUILDER_HOOKDIR=/usr/share/jenkins-debian-glue/pbuilder-hookdir/ 27 | 28 | # To enable a pbuilder configuration file for usage as documented 29 | # in man pbuilder(8) under --configfile set this option. 30 | # By default no user specific pbuilder configuration file is used. 31 | # PBUILDER_CONFIG=/etc/jenkins/pbuilderrc 32 | 33 | # Base directory for reprepro repositories, can be overwritten 34 | # via REPOSITORY on demand 35 | # Default: 36 | # DEFAULT_REPOSITORY='/srv/repository' 37 | 38 | # In order to keep the build versions unique and to ensure that there 39 | # are no duplicates, the version number from the changelog is padded 40 | # with the date and the build number. 41 | # To override this behaviour and preserve the version number from the 42 | # changelog, set USE_ORIG_VERSION to true. 43 | # USE_ORIG_VERSION=true 44 | 45 | # By default reprepro repositories are not verified but assumed to be 46 | # trustworthy. 47 | # Please note that if you build packages for Squeeze, the reprepro 48 | # repositories *MUST* be signed and verifiable. I.e. you need to set 49 | # KEY_ID and the corresponding keyring in REPOSITORY_KEYRING that 50 | # holds the public key portion for that KEY_ID. 51 | # REPOSITORY_KEYRING=/etc/apt/trusted.gpg.d/my-custom-keyring.gpg 52 | 53 | # If $release is set then "${REPOSITORY}/release/${release}" 54 | # is used as release repository. If you want to use a different 55 | # directory set RELEASE_REPOSITORY accordingly. 56 | # Default: 57 | # RELEASE_REPOSITORY="${REPOSITORY}/release/${release}" 58 | 59 | # Remove packages from a $release before processing incoming 60 | # This allows to rebuild and provide versions already existent 61 | # in the release repository they are built for. 62 | # Default: 63 | # REMOVE_FROM_RELEASE=false 64 | 65 | # By default the underlying build system (cowbuilder/pbuilder) 66 | # automatically destroys the build environment, even if building 67 | # fails for whatever reason. If DEB_KEEP_BUILD_ENV is set then 68 | # a copy of the build environment is created under 69 | # /var/cache/pbuilder/build/debug.$JOBNAME 70 | # Please be aware that those build environments usually require 71 | # quite some disk space, so do not forget to remove them. 72 | # If unset the build environment won't be kept if building fails. 73 | # DEB_KEEP_BUILD_ENV=true 74 | 75 | # Comma separated list of extra repositories for resolving dependencies. 76 | # Usage example: 77 | # REPOSITORY_EXTRA='deb http://security.debian.org/ wheezy/updates main,deb-src http://security.debian.org/ wheezy/updates main' 78 | # Default: 79 | # REPOSITORY_EXTRA= 80 | 81 | # Comma separated list of URLs with keys for extra repositories. 82 | # Usage example: 83 | # REPOSITORY_EXTRA_KEYS='http://foorepo.domain.com/key1.gpg,http://barrepo.domain.com/key2.gpg' 84 | # Default: 85 | # REPOSITORY_EXTRA_KEYS= 86 | 87 | # autopkgtests are executed automatically inside the cowbuilder environment by 88 | # default, corresponding to the ADT='internal' setting or if ADT is unset. 89 | # To execute autopkgtests also externally you need to set ADT to 90 | # either 'external' (no internal runs) or 'all' (internal + external runs). 91 | # The external autopkgtests depend on a configured ADT_RUNNER setting. 92 | # To skip internal as well as external autopkgtests set ADT='skip'. 93 | # Usage example (see adt-virt-qemu(1) for details regarding image setup): 94 | # ADT='external' 95 | # ADT_RUNNER="adt-virt-qemu /srv/adt-${distribution:-}-${architecture:-}.img" 96 | # Default: 97 | # ADT= 98 | 99 | # Control usage of eatmydata to speed up builds. If eatmydata is present on the 100 | # host system and when building for a recent distribution (Debian/jessie + 101 | # Ubuntu/vivid or newer) eatmydata is enabled automatically. 102 | # To force its usage (skipping any host + distribution checks) set it to 'true'. 103 | # To disable its usage set it to 'false'. 104 | # USE_EATMYDATA=true 105 | 106 | # Enable ccache (compiler cache for fast recompilation of C/C++ code) 107 | # to speed up builds. 108 | # USE_CCACHE=true 109 | 110 | # Specify the format (as accepted by the 'date' command) for the generated 111 | # build timestamp. 112 | # Default: %Y%m%d%H%M%S 113 | # TIMESTAMP_FORMAT="%Y%m%d%H%M%S" 114 | 115 | # In case you are explicitly marking your new package version as "UNRELEASED" 116 | # inside the debian/changelog file, you may not get a package build version 117 | # number containing the SCM commit. Set this to 'true' in order to work around 118 | # this. 119 | # Default: false 120 | # UNRELEASED_APPEND_COMMIT=false 121 | -------------------------------------------------------------------------------- /fabfile.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Deploy Debian package to jenkins build system(s) 3 | # 4 | # Usage examples: 5 | # % fab all 6 | # % fab build && fab deploy 7 | # % fab -H root@jenkins.example.org deploy 8 | ################################################################################ 9 | 10 | from fabric.api import * 11 | import os, paramiko, sys 12 | 13 | def set_hosts(): 14 | if not env.hosts: 15 | env.hosts = [] 16 | 17 | for host in 'jenkins', 'jenkins-slave1', 'jenkins-slave2', 'jenkins-slave3', 'jenkins-slave4', 'jenkins-slave5', 'jenkins-slave6': 18 | config = paramiko.SSHConfig() 19 | config.parse(open(os.path.expandvars("$HOME") + '/.ssh/config')) 20 | h = config.lookup(host) 21 | env.hosts.append(h['user'] + "@" + h['hostname']) 22 | 23 | return env.hosts 24 | 25 | @runs_once 26 | def build(): 27 | local('rm -f ../jenkins-debian-glue*all.deb') 28 | local('fakeroot debian/rules clean') 29 | local('fakeroot debian/rules binary') 30 | local('fakeroot debian/rules clean') 31 | 32 | @hosts(set_hosts()) 33 | def deploy(): 34 | put('../jenkins-debian-glue*_all.deb', '~/') 35 | run('dpkg -i ~/jenkins-debian-glue*_all.deb || apt-get -f install') 36 | 37 | def all(): 38 | build() 39 | deploy() 40 | 41 | ## END OF FILE ################################################################# 42 | -------------------------------------------------------------------------------- /git/post-receive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # git hook: post-receive 3 | 4 | # !!! PLEASE ADJUST !!! 5 | server=http://jenkins.example.org 6 | projectname=ADJUSTME 7 | token=ADJUSTME 8 | 9 | trigger_jenkins() 10 | { 11 | oldrev=$(git rev-parse $1) 12 | newrev=$(git rev-parse $2) 13 | refname="$3" 14 | 15 | if expr "$oldrev" : '0*$' >/dev/null ; then 16 | change_type="create" 17 | else 18 | if expr "$newrev" : '0*$' >/dev/null ; then 19 | change_type="delete" 20 | else 21 | change_type="update" 22 | fi 23 | fi 24 | 25 | newrev_type=$(git cat-file -t "$newrev" 2> /dev/null) 26 | oldrev_type=$(git cat-file -t "$oldrev" 2> /dev/null) 27 | 28 | case "$change_type" in 29 | create|update) 30 | rev="$newrev" 31 | rev_type="$newrev_type" 32 | ;; 33 | delete) 34 | return # we are not interested in deletes 35 | ;; 36 | esac 37 | 38 | case "$refname","$rev_type" in 39 | refs/heads/*,commit) 40 | # branch 41 | refname_type="branch" 42 | branch_name=${refname##refs/heads/} 43 | ;; 44 | esac 45 | 46 | echo "Detected branch $branch_name" 47 | 48 | # trigger autobuild 49 | if wget --tries=2 --dns-timeout=5 --connect-timeout=5 --read-timeout=5 \ 50 | -O /dev/null "${server}/job/${projectname}/buildWithParameters?token=$token&branch=origin/${branch_name}" >/dev/null 2>&1 ; then 51 | echo "Triggered autobuild at ${server}/job/${projectname}/lastBuild/" 52 | else 53 | echo "Could not trigger autobuild at ${server} (project not present/set up?)" 54 | fi 55 | 56 | # or with curl: 57 | # cause=git-hook-trigger 58 | # if curl --insecure --max-time 5 --connect-timeout 5 \ 59 | # --data-urlencode "token=${token}" \ 60 | # --data-urlencode "cause=${cause}" \ 61 | # --data-urlencode "branch=${branch_name}" \ 62 | # "${server}/job/${projectname}/buildWithParameters" >/dev/null 2>&1; then 63 | # ... 64 | } 65 | 66 | if [ -n "$1" ] && [ -n "$2" ] && [ -n "$3" ]; then 67 | trigger_jenkins $2 $3 $1 68 | else 69 | while read oldrev newrev refname; do 70 | trigger_jenkins $oldrev $newrev $refname 71 | done 72 | fi 73 | 74 | # vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2 75 | -------------------------------------------------------------------------------- /github/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem "httparty" 3 | gem "json" 4 | gem "sinatra" 5 | -------------------------------------------------------------------------------- /github/README: -------------------------------------------------------------------------------- 1 | README for github directory in jenkins-debian-glue 2 | -------------------------------------------------- 3 | 4 | The script hook_server.rb provides a simple gateway between GitHub and 5 | an (internal) Jenkins server to receive Git push actions from GitHub and 6 | trigger Jenkins jobs accordingly. Place this script on a host which is 7 | available from GitHub and has access to the (internal) Jenkins system as 8 | well. 9 | 10 | Instructions for usage: 11 | 12 | * configure hook_server settings via config.yml 13 | * adapt script hook_server.rb as needed 14 | * install dependencies via bundle [http://bundler.io/]: 15 | bundle install --path=bundled --verbose --binstubs 16 | * start service: 17 | bundle exec ./hook_server.rb 18 | * enable hook settings of according project(s) under GitHub's "WebHook 19 | URL", usage example: http://webhook.example.local:8042/trigger 20 | -------------------------------------------------------------------------------- /github/config.yml: -------------------------------------------------------------------------------- 1 | token: github_jenkins_ci 2 | cause: git_commit_triggered 3 | server: https://jenkins.example.local/ 4 | -------------------------------------------------------------------------------- /github/hook_server.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'httparty' 4 | require 'json' 5 | require 'net/http' 6 | require 'sinatra' 7 | 8 | set :port, 8042 9 | 10 | ## config 11 | CONFIG = YAML.load_file('config.yml') 12 | TOKEN = CONFIG["token"] || "unconfigured" 13 | CAUSE = CONFIG["cause"] || "git_commit_triggered" 14 | SERVER = CONFIG["server"] || "https://jenkins/" 15 | 16 | 17 | ## helper functions 18 | def trigger_job(job, branch) 19 | uri = URI("#{SERVER}job/#{job}/buildWithParameters") 20 | 21 | req = Net::HTTP::Post.new(uri.path) 22 | req.set_form_data('token' => TOKEN, 23 | 'cause' => CAUSE, 24 | 'branch' => branch) 25 | 26 | res = Net::HTTP.start(uri.host, uri.port, 27 | :use_ssl => uri.scheme == 'https', 28 | :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http| 29 | http.request(req) 30 | end 31 | 32 | case res 33 | when Net::HTTPSuccess, Net::HTTPRedirection 34 | p "OK" 35 | else 36 | res.value 37 | end 38 | end 39 | 40 | 41 | def job_names 42 | json = HTTParty.get("#{SERVER}/api/json") 43 | json["jobs"].map {|job| job["name"]} 44 | end 45 | 46 | 47 | def job_details(job_name) 48 | HTTParty.get("#{SERVER}/job/#{job_name}/api/json") 49 | end 50 | 51 | 52 | def build_details(job_name, build_number) 53 | HTTParty.get("#{SERVER}/job/#{job_name}/#{build_number}/api/json") 54 | end 55 | 56 | ## main sinatra app 57 | 58 | # this is where GitHub actually ends up at, configured as 59 | # WebHook URL at https://github.com/$OWNER/$PROJECT/settings/hooks 60 | post '/trigger' do 61 | push = JSON.parse(params[:payload]) 62 | # p "JSON data: #{push.inspect}" 63 | # p JSON.pretty_generate(push) 64 | 65 | project = push["repository"]["name"] 66 | project = project + "-source" # we use $job-source as default entry point 67 | branch = push["ref"] 68 | 69 | # make sure we do not trigger a build with a branch that was just deleted 70 | deleted = push["deleted"] 71 | 72 | if deleted 73 | puts "branch #{branch} was deleted, not triggering build" 74 | elsif job_names.include? project 75 | trigger_job(project, branch) 76 | else 77 | puts "no such job #{project}" 78 | end 79 | end 80 | 81 | # debugging helper 82 | post '/debug' do 83 | puts params[:payload] 84 | end 85 | 86 | ## END OF FILE ################################################################# 87 | -------------------------------------------------------------------------------- /jjb/README: -------------------------------------------------------------------------------- 1 | README for jjb directory in jenkins-debian-glue 2 | ----------------------------------------------- 3 | 4 | Jenkins Job Builder (JJB) takes simple descriptions of Jenkins 5 | jobs in YAML format and uses them to configure Jenkins. 6 | This directory provides some sample configuration for usage of 7 | jenkins-debian-glue with Jenkins Job Builder. 8 | 9 | Usage instructions: 10 | 11 | 1) Install jenkins-job-builder, available as Debian package 12 | in Debian jessie and newer and in Ubuntu [universe] 13 | raring, saucy, trusty and newer, or from upstream at 14 | https://github.com/openstack-infra/jenkins-job-builder 15 | Find upstream documentation for jenkins-job-builder at 16 | http://ci.openstack.org/jenkins-job-builder 17 | 18 | 2) Create /etc/jenkins_jobs/jenkins_jobs.ini, like (adjust user, 19 | password and url settings as needed for your environment): 20 | 21 | [jenkins] 22 | user=jenkins-job-builder 23 | password=jenkins-job-builder 24 | url=http://localhost:8080/ 25 | 26 | 3) Execute e.g. 'jenkins-jobs update jjb/jdg-reprepro.yaml' to 27 | generate Jenkins jobs in the specified Jenkins environment (see 28 | point 2) as defined in file jdg-reprepro.yaml, currently being 29 | jobs jenkins-debian-glue-source, jenkins-debian-glue-binaries 30 | and jenkins-debian-glue-piuparts. 31 | 32 | The jjb/jdg-freight.yaml file configures Jenkins jobs 33 | jdg-freight-source and jdg-freight-binaries, which provide 34 | a similar setup as jenkins-debian-glue-* but using the 35 | freight repository software [https://github.com/rcrowley/freight/] 36 | instead of using reprepro [http://mirrorer.alioth.debian.org/]. 37 | 38 | Hint: by running "mkdir /tmp/jdg; jenkins-jobs test jjb/ -o /tmp/jdg' 39 | you can get a test configuration of your jobs without 40 | directly deploying them into the Jenkins system. 41 | 42 | Notes: 43 | 44 | * the yaml files assume amd64 as default architecture, 45 | if you don't have an amd64 system please adjust the 46 | references to "amd64" in the files with "i386" (or so) 47 | * you need to adjust the KEY_ID setting in jjb/jdg-freight.yaml 48 | before executing the jdg-freight-* Jenkins jobs (and if you 49 | don't have a GPG key for the user which runs the job yet you 50 | also have to create a key running 'gpg --gen-key') 51 | * junit's "keep-long-stdio: false" setting requires 52 | jenkins-job-builder >0.5.0 (available as of git commit 2faa91e2). 53 | * the TAP test result files feature requires 54 | jenkins-job-builder >0.5.0 (available as of git commit 624fd659). 55 | -------------------------------------------------------------------------------- /jjb/jdg-freight.yaml: -------------------------------------------------------------------------------- 1 | # This jenkins-job-build configuration sets up Jenkins jobs 2 | # for building Debian packages of jenkins-debian-glue 3 | # which are provided using the repository software called freight 4 | # [https://github.com/rcrowley/freight/] then. 5 | 6 | - project: 7 | name: jdg-freight 8 | repos: https://github.com/mika/jenkins-debian-glue.git 9 | jobs: 10 | - '{name}-source' 11 | - '{name}-binaries' 12 | 13 | - job-template: 14 | name: '{name}-source' 15 | project-type: freestyle 16 | description: 'Build Debian source package of {name}.
Do not edit this job through the web, it is generated via jenkins-job-builder!' 17 | disabled: false 18 | scm: 19 | - git: 20 | url: '{repos}' 21 | name: origin 22 | refspec: +refs/heads/*:refs/remotes/origin/* 23 | basedir: source 24 | branches: 25 | - master 26 | wipe-workspace: false 27 | builders: 28 | - shell: 'rm -f ./* || true' 29 | - shell: '/usr/bin/jdg-generate-git-snapshot' 30 | - shell: | 31 | mkdir -p report 32 | /usr/bin/jdg-lintian-junit-report *.dsc > report/lintian.xml 33 | publishers: 34 | - archive: 35 | artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt' 36 | - trigger: 37 | project: '{name}-binaries' 38 | - junit: 39 | results: '**/lintian.xml' 40 | keep-long-stdio: false 41 | - fingerprint: 42 | record-artifacts: true 43 | wrappers: 44 | - timestamps 45 | 46 | - job-template: 47 | name: '{name}-binaries' 48 | project-type: matrix 49 | description: | 50 |

Build Debian binary packages of {name}.
Do not edit this job through the web, it is generated via jenkins-job-builder!

51 |

Usage instructions how to remotely access and use the repository:

52 |

Install apache webserver:

53 |
54 |             sudo apt-get install apache2
55 |             sudo ln -s /var/cache/freight /var/www/debian
56 |           
57 |

Then access to this repository is available using the following sources.list entry:

58 |
59 |             deb     http://$jenkins_server/debian/ {name} main
60 |             deb-src http://$jenkins_server/debian/ {name} main
61 |           
62 | execution-strategy: 63 | sequential: true 64 | axes: 65 | - axis: 66 | type: user-defined 67 | name: architecture 68 | values: 69 | - amd64 70 | builders: 71 | - copyartifact: 72 | project: '{name}-source' 73 | filter: '*' 74 | which-build: upstream-build 75 | fallback-to-last-successful: true 76 | - shell: | 77 | export USE_FREIGHT=true 78 | export SUDO_CMD=sudo 79 | export KEY_ID=DEADBEEF # please adjust, or edit /etc/freight.conf 80 | /usr/bin/jdg-build-and-provide-package 81 | - shell: | 82 | mkdir -p report 83 | /usr/bin/jdg-lintian-junit-report *.changes > report/lintian.xml 84 | publishers: 85 | - archive: 86 | artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt' 87 | - junit: 88 | results: '**/lintian.xml' 89 | keep-long-stdio: false 90 | - fingerprint: 91 | record-artifacts: true 92 | - workspace-cleanup: 93 | dirmatch: false 94 | wrappers: 95 | - timestamps 96 | -------------------------------------------------------------------------------- /jjb/jdg-reprepro.yaml: -------------------------------------------------------------------------------- 1 | # This jenkins-job-build configuration sets up Jenkins jobs 2 | # for building Debian packages of jenkins-debian-glue 3 | # which are provided using the repository software called reprepro 4 | # [http://mirrorer.alioth.debian.org/] then. 5 | 6 | - project: 7 | name: jenkins-debian-glue 8 | repos: https://github.com/mika/jenkins-debian-glue.git 9 | jobs: 10 | - '{name}-source' 11 | - '{name}-binaries' 12 | - '{name}-piuparts' 13 | 14 | - job-template: 15 | name: '{name}-source' 16 | project-type: freestyle 17 | description: 'Build Debian source package of {name}.
Do not edit this job through the web, it is generated via jenkins-job-builder!' 18 | disabled: false 19 | scm: 20 | - git: 21 | url: '{repos}' 22 | name: origin 23 | refspec: +refs/heads/*:refs/remotes/origin/* 24 | basedir: source 25 | branches: 26 | - master 27 | wipe-workspace: false 28 | builders: 29 | - shell: 'rm -f ./* || true' 30 | - shell: '/usr/bin/jdg-generate-git-snapshot' 31 | - shell: | 32 | mkdir -p report 33 | /usr/bin/jdg-lintian-junit-report *.dsc > report/lintian.xml 34 | publishers: 35 | - archive: 36 | artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt' 37 | - trigger: 38 | project: '{name}-binaries' 39 | - junit: 40 | results: '**/lintian.xml' 41 | keep-long-stdio: false 42 | - fingerprint: 43 | record-artifacts: true 44 | wrappers: 45 | - timestamps 46 | 47 | - job-template: 48 | name: '{name}-binaries' 49 | project-type: matrix 50 | description: | 51 |

Build Debian binary packages of {name}.
Do not edit this job through the web, it is generated via jenkins-job-builder!

52 |

Usage instructions how to remotely access and use the repository:

53 |

Install apache webserver:

54 |
 55 |             sudo apt-get install apache2
 56 |             sudo ln -s /srv/repository /var/www/debian
 57 |           
58 |

Then access to this repository is available using the following sources.list entry:

59 |
 60 |             deb     http://$jenkins_server/debian/ {name} main
 61 |             deb-src http://$jenkins_server/debian/ {name} main
 62 |           
63 | execution-strategy: 64 | sequential: true 65 | axes: 66 | - axis: 67 | type: user-defined 68 | name: architecture 69 | values: 70 | - amd64 71 | builders: 72 | - copyartifact: 73 | project: '{name}-source' 74 | filter: '*' 75 | which-build: upstream-build 76 | fallback-to-last-successful: true 77 | - shell: "/usr/bin/jdg-build-and-provide-package" 78 | - shell: | 79 | echo "Listing packages inside the {name} repository:" 80 | /usr/bin/jdg-repository-checker --list-repos {name} 81 | - shell: | 82 | mkdir -p report 83 | /usr/bin/jdg-lintian-junit-report *.changes > report/lintian.xml 84 | publishers: 85 | - archive: 86 | artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt' 87 | - junit: 88 | results: '**/lintian.xml' 89 | keep-long-stdio: false 90 | - fingerprint: 91 | record-artifacts: true 92 | - trigger: 93 | project: '{name}-piuparts' 94 | - workspace-cleanup: 95 | dirmatch: false 96 | wrappers: 97 | - timestamps 98 | 99 | - job-template: 100 | name: '{name}-piuparts' 101 | project-type: freestyle 102 | description: 'Installation and upgrade tests for {name} Debian packages.
Do not edit this job through the web, it is generated via jenkins-job-builder!' 103 | disabled: false 104 | parameters: 105 | - string: 106 | name: architecture 107 | default: amd64 108 | description: "Architecture that should be used." 109 | builders: 110 | - copyartifact: 111 | project: '{name}-binaries/architecture=$architecture' 112 | filter: '*.deb' 113 | which-build: upstream-build 114 | fallback-to-last-successful: true 115 | flatten: true 116 | target: 'artifacts/' 117 | - shell: | 118 | # sadly piuparts always returns with exit code 1 :(( 119 | sudo jdg-piuparts-wrapper $PWD/artifacts/*.deb || true 120 | - shell: 'jdg-tap-piuparts piuparts.txt > piuparts.tap' 121 | publishers: 122 | - tap: 123 | results: 'piuparts.tap' 124 | - archive: 125 | artifacts: 'piuparts.*' 126 | - fingerprint: 127 | record-artifacts: true 128 | - workspace-cleanup: 129 | dirmatch: false 130 | wrappers: 131 | - timestamps 132 | -------------------------------------------------------------------------------- /pbuilder-hookdir/B20autopkgtest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2013 Michael Prokop 3 | # Copyright 2012 Christoph Berg 4 | # Licensed under the terms of the MIT License. 5 | 6 | if [ "${ADT:-}" = "skip" ]; then 7 | echo "Skipping autopkgtests as requested (ADT is set to 'skip')" 8 | exit 0 9 | fi 10 | 11 | if [ "${ADT:-}" = "external" ]; then 12 | echo "Skipping internal autopkgtests as external testing was requested via ADT variable" 13 | exit 0 14 | fi 15 | 16 | set -ex 17 | 18 | cd /tmp/buildd/*/debian/.. 19 | 20 | if [ ! -f debian/tests/control ]; then 21 | echo "Package does not have autopkgtest support, debian/tests/control is missing" 22 | exit 0 23 | fi 24 | 25 | if [ ! -f debian/files ]; then 26 | echo "Package source is not built, debian/files is missing" >&2 27 | exit 1 28 | fi 29 | 30 | if [ -n "${ADT_OPTIONS:-}" ] ; then 31 | echo "*** Using provided ADT_OPTIONS $ADT_OPTIONS ***" 32 | fi 33 | 34 | # try to launch autopkgtest in a new PID namespace so several testsuites can run 35 | # in parallel, newpid exists in jessie and newer only though 36 | unset newpid_name 37 | if ! apt-cache policy newpid | grep -q 'newpid:' ; then 38 | echo "The newpid package doesn't seem to be available, not considering for installation" 39 | else 40 | echo "The newpid package seems to be available, considering for installation" 41 | newpid_name='newpid' 42 | fi 43 | 44 | # autopkgtest uses apt-utils's apt-ftparchive and 45 | # pbuilder's pbuilder-satisfydepends-classic 46 | apt-get install -y autopkgtest apt-utils pbuilder $newpid_name 47 | 48 | if [ -x /usr/bin/autopkgtest ]; then 49 | # starting with autopkgtest 5.0 there's only the dedicated autopkgtest CLI 50 | AUTOPKG_BINARY=autopkgtest 51 | elif [ -x /usr/bin/adt-run ] ; then 52 | # autopkgtest as in Debian/jessie (v3.6jessie1) and older doesn't provide 53 | # autopkgtest binary yet, but let's be backwards compatible 54 | AUTOPKG_BINARY=adt-run 55 | else 56 | echo "Error: neither autopkgtest nor adt-run binary found." >&2 57 | exit 1 58 | fi 59 | 60 | # since autopkgtest 3.16 the --tmp-dir option is gone, make sure 61 | # we've --output-dir available though before using it 62 | if "$AUTOPKG_BINARY" --help | grep -q -- --output-dir 2>/dev/null ; then 63 | OUTPUT_OPTION='--output-dir' 64 | else 65 | OUTPUT_OPTION='--tmp-dir' 66 | fi 67 | 68 | mkdir -p /tmp/buildd/autopkgtest.out 69 | 70 | if [ -x /usr/bin/autopkgtest ]; then 71 | # new autopkgtest interface 72 | $newpid_name "$AUTOPKG_BINARY" \ 73 | ${OUTPUT_OPTION} /tmp/buildd/autopkgtest.out \ 74 | --summary /tmp/buildd/autopkgtest.summary \ 75 | "${PWD}" \ 76 | /tmp/buildd/*.deb \ 77 | ${ADT_OPTIONS:-} -- null || EXIT=$? 78 | else 79 | # old adt interface 80 | $newpid_name "$AUTOPKG_BINARY" \ 81 | ${OUTPUT_OPTION} /tmp/buildd/autopkgtest.out \ 82 | --summary /tmp/buildd/autopkgtest.summary \ 83 | /tmp/buildd/*.deb \ 84 | --built-tree "${PWD}" \ 85 | ${ADT_OPTIONS:-} --- adt-virt-null || EXIT=$? 86 | fi 87 | 88 | # collect autopkgtest output in a single file so pbuilder automatically copies it 89 | tar acf /tmp/buildd/autopkgtest.tar.gz /tmp/buildd/autopkgtest.out 90 | 91 | case ${EXIT:-0} in 92 | 2|4|6|8) # let jdg-tap-adtsummary report the failure 93 | exit 0 94 | ;; 95 | *) 96 | exit ${EXIT:-0} 97 | ;; 98 | esac 99 | -------------------------------------------------------------------------------- /pbuilder-hookdir/B90lintian: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Hook to run lintian inside the cowbuilder environment. 4 | # 5 | 6 | BUILDDIR="${BUILDDIR:-/tmp/buildd}" 7 | 8 | if [ "${LINTIAN:-}" != "true" ] ; then 9 | echo "Skipping lintian (LINTIAN is not 'true')" 10 | exit 0 11 | fi 12 | 13 | if [ -n "${LINTIAN_OPTIONS:-}" ] ; then 14 | echo "*** Using provided LINTIAN_OPTIONS $LINTIAN_OPTIONS ***" 15 | fi 16 | 17 | set -ex -o pipefail 18 | apt-get -y "${APTGETOPT[@]}" install lintian 19 | lintian --version 20 | 21 | package_dir=$(cd "$BUILDDIR"/*/debian/.. 2>/dev/null && pwd -P) 22 | PACKAGE_NAME=$(basename "$package_dir") 23 | 24 | echo "Found package name: $PACKAGE_NAME" 25 | 26 | # Requires a .pbuilderrc with: 27 | # export ADDITIONAL_BUILDRESULTS=(../*.lintian.txt) 28 | lintian_out=${BUILDDIR}/${PACKAGE_NAME}.lintian.txt 29 | 30 | DSC_EXIT=0 31 | if ls "${BUILDDIR}"/*.dsc &>/dev/null ; then 32 | su -s /bin/bash -c "set -o pipefail; lintian ${LINTIAN_OPTIONS:-} \"${BUILDDIR}\"/*.dsc 2>&1 | tee \"${lintian_out}\"" - pbuilder \ 33 | || DSC_EXIT=$? 34 | else 35 | echo "WARNING: no dsc file, not executing lintian on source package files" 36 | fi 37 | 38 | CHANGES_EXIT=0 39 | su -s /bin/bash -c "set -o pipefail; lintian ${LINTIAN_OPTIONS:-} \"${BUILDDIR}\"/*.changes 2>&1 | tee -a \"${lintian_out}\"" - pbuilder \ 40 | || CHANGES_EXIT=$? 41 | 42 | # We strip ANSI sequences in case lintian got --color forced 43 | sed -i 's%\x1B\[[0-9;]*\?[mGKH]%%g' "${lintian_out}" 44 | 45 | if [[ "${DSC_EXIT:-0}" =~ [01] ]] && [[ "${CHANGES_EXIT:-0}" =~ [01] ]] ; then 46 | echo "Finished lintian execution [DSC_EXIT=${DSC_EXIT} CHANGES_EXIT=${CHANGES_EXIT}]" 47 | exit 0 48 | else 49 | echo "Error: lintian execution failed [DSC_EXIT=${DSC_EXIT} CHANGES_EXIT=${CHANGES_EXIT}]" >&2 50 | exit 2 51 | fi 52 | -------------------------------------------------------------------------------- /pbuilder-hookdir/C10shell: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2013 Michael Prokop 3 | # Licensed under the terms of the MIT License. 4 | 5 | cat <&2 <=0.216 38 | else 39 | BUILD_DIR="/tmp/buildd" # pbuilder <0.216 40 | fi 41 | 42 | cd "${BUILD_DIR}"/*/debian/.. 43 | ID="$(basename $PWD)" 44 | 45 | touch /testfile.$$ 46 | BUILD=/var/cache/pbuilder/build/*/testfile.$$ 47 | BUILD=$(dirname $BUILD) 48 | 49 | cat </dev/null)" ge '1.15.8.6' 2>/dev/null ; then 7 | echo "I: Force DPKG unsafe IO" 8 | echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup 9 | fi 10 | -------------------------------------------------------------------------------- /pbuilder-hookdir/D20releaserepo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | 5 | set -- /tmp/apt-*/ 6 | TMPAPT="$1" 7 | 8 | if [ -d "$TMPAPT" ]; then 9 | UPDATE_PKGLIST=0 10 | 11 | if ls "${TMPAPT}"*.list 2>/dev/null; then 12 | echo "Using additional apt sources:" 13 | cat "${TMPAPT}"*.list 14 | 15 | cp "${TMPAPT}"*.list /etc/apt/sources.list.d/ 16 | 17 | UPDATE_PKGLIST=1 18 | fi 19 | 20 | if [ -e "${TMPAPT}/keyring.gpg" ]; then 21 | echo "Using keyring for additional apt sources." 22 | 23 | cp "${TMPAPT}/keyring.gpg" /etc/apt/trusted.gpg.d 24 | chmod 0644 /etc/apt/trusted.gpg.d/keyring.gpg 25 | fi 26 | 27 | if [ "$UPDATE_PKGLIST" = 1 ]; then 28 | /usr/bin/apt-get update 29 | fi 30 | fi 31 | -------------------------------------------------------------------------------- /puppet/apply.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | start_seconds=$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime) 4 | [ -n "$start_seconds" ] && SECONDS="$[$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)-$start_seconds]" || SECONDS="unknown" 5 | 6 | if [ -r /var/lib/jenkins/config.xml ] ; then 7 | echo "NOTE: Configuration file /var/lib/jenkins/config.xml exists already." 8 | 9 | if [ "$1" == "--force" ] ; then 10 | echo "Continuing execution as requested via --force." 11 | else 12 | echo "Exiting to avoid possible data loss. To force execution, run '$0 --force'" >&2 13 | exit 1 14 | fi 15 | fi 16 | 17 | # workaround for puppet's facter, which looks at `uname -m` (reporting e.g. aarch64) 18 | # while `dpkg --print-architecture` reports arm64 19 | export FACTER_JDG_DEBIAN_ARCH="$(dpkg --print-architecture)" 20 | 21 | if [ -z "${FACTER_JDG_DEBIAN_ARCH:-}" ] ; then 22 | echo "Error reporting Debian architecture (via 'dpkg --print-architecture')" >&2 23 | exit 1 24 | fi 25 | 26 | if ! [ -r jenkins_debian_glue.pp ] ; then 27 | wget https://raw.github.com/mika/jenkins-debian-glue/master/puppet/jenkins_debian_glue.pp 28 | fi 29 | 30 | if ! [ -r jenkins_debian_glue.pp ] ; then 31 | echo "Error: can not find jenkins_debian_glue.pp." >&2 32 | echo "Make sure to fetch e.g. https://raw.github.com/mika/jenkins-debian-glue/master/puppet/jenkins_debian_glue.pp" >&2 33 | exit 1 34 | fi 35 | 36 | if ! type puppet &>/dev/null ; then 37 | apt-get update 38 | apt-get -y install puppet || exit 1 39 | fi 40 | 41 | # Amazon EC2 returns the internal IP by default, so ask about the public one 42 | IP=$(facter ec2_public_ipv4 2>/dev/null) # curl http://169.254.169.254/latest/meta-data/public-ipv4 43 | # 'facter ec2_public_ipv4' returns nothing on Debian's AMI :( 44 | if [ -z "$IP" ] ; then 45 | IP=$(wget --quiet --tries=3 --timeout=3 -O - http://169.254.169.254/latest/meta-data/public-ipv4 2>/dev/null) 46 | fi 47 | 48 | # try Google Compute Engine 49 | if [ -z "$IP" ] ; then 50 | IP=$(wget --quiet --tries=3 --timeout=3 -O - "http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" --header "X-Google-Metadata-Request: True" 2>/dev/null) 51 | fi 52 | 53 | # neither using EC2 nor GCE? use a fallback then 54 | if [ -z "$IP" ] ; then 55 | IP=$(ip addr show dev $(route -n | awk '/^0\.0\.0\.0/{print $NF}') | awk '/inet / {print $2}' | head -1 |sed "s;/.*;;") 56 | fi 57 | 58 | if [[ "$(hostname -f 2>/dev/null)" == "" ]] ; then 59 | echo "Error: please make sure you have a valid FQDN configured in /etc/hosts" >&2 60 | echo "NOTE: Something like adding the following snippet to /etc/hosts might help: 61 | 62 | $IP $(hostname).example.org $(hostname) 63 | " 64 | exit 1 65 | fi 66 | 67 | if dpkg --compare-versions "$(dpkg-query -f "\${Version}\n" -W dpkg 2>/dev/null)" ge '1.17.11' 2>/dev/null ; then 68 | package_check() { 69 | local package="$1" 70 | [ "$(dpkg-query -f "\${db:Status-Status} \${db:Status-Eflag}" -W "$package" 2>/dev/null)" = 'installed ok' ] 71 | } 72 | else # dpkg versions older than 1.17.11 (e.g. Debian/wheezy) don't support db:Status* flags, so fall back then 73 | package_check() { 74 | local package="$1" 75 | dpkg --list "$package" 2>/dev/null | grep -q '^.i' 76 | } 77 | fi 78 | 79 | package_installed() { 80 | local packages="$*" 81 | 82 | for package in $packages ; do 83 | if ! package_check "$package" ; then 84 | return 1 85 | fi 86 | done 87 | } 88 | 89 | if puppet apply jenkins_debian_glue.pp ; then 90 | if ! package_installed jenkins jenkins-debian-glue; then 91 | echo "While puppet reported a successful run, jenkins and/or jenkins-debian-glue aren't successfully installed. :(" >&2 92 | echo "Please re-execute this script and if the problem persists please report this at" >&2 93 | echo "https://github.com/mika/jenkins-debian-glue/issues" >&2 94 | exit 1 95 | fi 96 | 97 | [ -n "$start_seconds" ] && SECONDS="$[$(sed -e 's/^\([0-9]*\).*/\1/' < /proc/uptime)-$start_seconds]" || SECONDS="unknown" 98 | echo "jenkins-debian-glue deployment finished after ${SECONDS} seconds." 99 | else 100 | echo "Fatal error during puppet run. :(" >&2 101 | exit 1 102 | fi 103 | 104 | echo " 105 | NOTE: if you should notice failing Jenkins jobs, this might be related to 106 | incomplete Jenkins plugin dependencies (see 107 | https://github.com/jenkinsci/puppet-jenkins/issues/64 + 108 | https://github.com/jenkinsci/puppet-jenkins/issues/12 for details why we 109 | can't easily automate that yet). 110 | 111 | Take care by following the Jenkins setup wizard, to unlock your Jenkins system 112 | and also install the suggested plugins within the setup wizard, to do so visit 113 | http://${IP}:8080 114 | 115 | IMPORTANT: You also need to manually install the 'Copy Artifact' Jenkins plugin, 116 | visit http://${IP}:8080/manage/pluginManager/available 117 | 118 | If building the jenkins-debian-glue* Jenkins jobs should still fail, 119 | ensure that the Jenkins server was restarted ('sudo systemctl restart jenkins'), 120 | and also rebuild the jenkins-debian-glue* Jenkins jobs after taking care of 121 | the plugin situation mentioned above, by running: 122 | 123 | sudo puppet apply ./jenkins_debian_glue.pp 124 | 125 | Enjoy your Jenkins setup." 126 | -------------------------------------------------------------------------------- /puppet/jenkins_debian_glue.pp: -------------------------------------------------------------------------------- 1 | define apt::key($ensure = present, $source) { 2 | case $ensure { 3 | present: { 4 | exec { "/usr/bin/wget -O - '${source}' | /usr/bin/apt-key add -": 5 | unless => "apt-key list | grep -Fqe '${name}'", 6 | path => '/bin:/usr/bin', 7 | require => Package['wget'], 8 | } 9 | } 10 | 11 | absent: { 12 | exec {"/usr/bin/apt-key del ${name}": 13 | onlyif => "apt-key list | grep -Fqe '${name}'", 14 | } 15 | } 16 | } 17 | } 18 | 19 | if defined('$ec2_public_ipv4') { 20 | $jenkins_server = $ec2_public_ipv4 21 | } elsif defined('$ipaddress') { 22 | $jenkins_server = $ipaddress 23 | } else { 24 | $jenkins_server = 'YOUR_JENKINS_SERVER' 25 | } 26 | 27 | class jenkins::repos { 28 | 29 | package { 'apt-transport-https': 30 | ensure => present, 31 | } 32 | 33 | package { 'gnupg': 34 | ensure => present, 35 | } 36 | 37 | package { 'wget': 38 | ensure => present, 39 | } 40 | 41 | apt::key { 'EF5975CA': 42 | ensure => present, 43 | source => 'https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key', 44 | } 45 | 46 | file { '/etc/apt/sources.list.d/jenkins.list': 47 | ensure => present, 48 | content => "deb https://pkg.jenkins.io/debian-stable binary/\n", 49 | require => [ 50 | Apt::Key['EF5975CA'], 51 | Package['apt-transport-https'], 52 | ], 53 | } 54 | 55 | exec { 'refresh-apt-jenkins': 56 | require => [ 57 | File['/etc/apt/sources.list.d/jenkins.list'], 58 | Apt::Key['EF5975CA'], 59 | ], 60 | command => '/usr/bin/apt-get update', 61 | } 62 | } 63 | 64 | 65 | class jenkins::software { 66 | 67 | package { 'default-jre-headless': 68 | ensure => present, 69 | } 70 | 71 | package { 'jenkins': 72 | ensure => present, 73 | require => [ 74 | File['/etc/apt/sources.list.d/jenkins.list'], 75 | File['/etc/sudoers.d/jenkins'], 76 | Exec['refresh-apt-jenkins'], 77 | Package['default-jre-headless'], 78 | ] 79 | } 80 | 81 | package { [ 'jenkins-debian-glue', 82 | 'jenkins-debian-glue-buildenv' ]: 83 | ensure => present, 84 | } 85 | 86 | service { 'jenkins': 87 | ensure => running, 88 | require => [ 89 | Package['jenkins'], 90 | ] 91 | } 92 | 93 | package { 'sudo': 94 | ensure => present, 95 | } 96 | 97 | file { '/etc/sudoers.d/jenkins': 98 | mode => '0440', 99 | content => '## Deployed via jenkins_debian_glue.pp 100 | 101 | # Make sure DEB_* options reach cowbuilder, like e.g.: 102 | # export DEB_BUILD_OPTIONS="parallel=8" /usr/bin/jdg-build-and-provide-package 103 | Defaults env_keep+="DEB_* DIST ARCH ADT MIRRORSITE" 104 | 105 | # for *-binaries job 106 | jenkins ALL=NOPASSWD: /usr/sbin/cowbuilder, /usr/sbin/chroot 107 | # for *-piuparts job 108 | jenkins ALL=NOPASSWD: /usr/sbin/piuparts, /usr/sbin/debootstrap, /usr/bin/jdg-piuparts-wrapper 109 | ', 110 | require => Package['sudo'], 111 | } 112 | } 113 | 114 | 115 | class jenkins::reprepro { 116 | file { '/srv/repository': 117 | ensure => directory, 118 | mode => '0755', 119 | owner => 'jenkins', 120 | require => Package['jenkins'], 121 | } 122 | } 123 | 124 | 125 | class jenkins::config { 126 | file { '/var/lib/jenkins/.gitconfig': 127 | ensure => present, 128 | mode => '0644', 129 | owner => 'jenkins', 130 | content =>'[user] 131 | email = jenkins@example.org 132 | name = Jenkins User 133 | ', 134 | require => Package['jenkins'], 135 | } 136 | 137 | file { '/var/lib/jenkins/jobs': 138 | ensure => directory, 139 | mode => '0755', 140 | owner => 'jenkins', 141 | require => Package['jenkins'], 142 | } 143 | 144 | file { '/var/lib/jenkins/jobs/jenkins-debian-glue-source': 145 | ensure => directory, 146 | mode => '0755', 147 | owner => 'jenkins', 148 | require => Package['jenkins'], 149 | } 150 | 151 | file { '/var/lib/jenkins/jobs/jenkins-debian-glue-source/config.xml': 152 | ensure => present, 153 | mode => '0644', 154 | owner => 'jenkins', 155 | require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-source'], 156 | notify => Service['jenkins'], 157 | content => " 158 | 159 | 160 | Build Debian source package of jenkins-debian-glue 161 | false 162 | 163 | 164 | 2 165 | 166 | 167 | 168 | 169 | https://github.com/mika/jenkins-debian-glue.git 170 | 171 | 172 | 173 | 174 | master 175 | 176 | 177 | false 178 | false 179 | false 180 | false 181 | false 182 | false 183 | false 184 | false 185 | false 186 | 187 | Default 188 | 189 | source 190 | 191 | 192 | 193 | 194 | 195 | false 196 | 197 | 198 | 199 | true 200 | false 201 | false 202 | false 203 | 204 | false 205 | 206 | 207 | rm -f ./* || true 208 | 209 | 210 | # when using git: 211 | /usr/bin/jdg-generate-git-snapshot 212 | 213 | # when using subversion: 214 | # /usr/bin/jdg-generate-svn-snapshot 215 | 216 | 217 | mkdir -p report 218 | /usr/bin/jdg-lintian-junit-report *.dsc > report/lintian.xml 219 | 220 | 221 | 222 | 223 | *.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt 224 | false 225 | 226 | 227 | 228 | true 229 | 230 | 231 | jenkins-debian-glue-binaries 232 | 233 | SUCCESS 234 | 0 235 | BLUE 236 | 237 | 238 | 239 | **/lintian.xml 240 | false 241 | 242 | 243 | 244 | 245 | 246 | " 247 | } 248 | 249 | file { '/var/lib/jenkins/jobs/jenkins-debian-glue-binaries': 250 | ensure => directory, 251 | mode => '0755', 252 | owner => 'jenkins', 253 | require => Package['jenkins'], 254 | } 255 | 256 | file { '/var/lib/jenkins/jobs/jenkins-debian-glue-binaries/config.xml': 257 | ensure => present, 258 | mode => '0644', 259 | owner => 'jenkins', 260 | require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-binaries'], 261 | notify => Service['jenkins'], 262 | content => " 263 | 264 | 265 | <p>Build Debian binary packages of jenkins-debian-glue</p> 266 | 267 | <h2>Usage instructions how to remotely access and use the repository</h2> 268 | 269 | <p>Install apache webserver:</p> 270 | 271 | <pre> 272 | sudo apt-get install apache2 273 | sudo ln -s /srv/repository /var/www/debian 274 | </pre> 275 | 276 | <p>Then access to this repository is available using the following sources.list entry:</p> 277 | 278 | <pre> 279 | deb http://${jenkins_server}/debian/ jenkins-debian-glue main 280 | deb-src http://${jenkins_server}/debian/ jenkins-debian-glue main 281 | </pre> 282 | false 283 | 284 | 285 | true 286 | false 287 | false 288 | false 289 | 290 | false 291 | 292 | 293 | architecture 294 | 295 | ${::jdg_debian_arch} 296 | 297 | 298 | 299 | 300 | 301 | jenkins-debian-glue-source 302 | * 303 | 304 | 305 | true 306 | 307 | 308 | 309 | export POST_BUILD_HOOK=/usr/bin/jdg-debc 310 | /usr/bin/jdg-build-and-provide-package 311 | 312 | 313 | echo "Listing packages inside the jenkins-debian-glue repository:" 314 | /usr/bin/jdg-repository-checker --list-repos jenkins-debian-glue 315 | 316 | 317 | mkdir -p report 318 | /usr/bin/jdg-lintian-junit-report *.dsc > report/lintian.xml 319 | 320 | 321 | 322 | 323 | *.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,*.buildinfo,lintian.txt 324 | false 325 | 326 | 327 | 328 | true 329 | 330 | 331 | **/lintian.xml 332 | false 333 | 334 | 335 | 336 | jenkins-debian-glue-piuparts 337 | 338 | SUCCESS 339 | 0 340 | BLUE 341 | 342 | 343 | 344 | 345 | 346 | false 347 | 348 | 349 | 350 | true 351 | 352 | 353 | " 354 | } 355 | 356 | file { '/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts/': 357 | ensure => directory, 358 | mode => '0755', 359 | owner => 'jenkins', 360 | require => Package['jenkins'], 361 | } 362 | 363 | file { '/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts/config.xml': 364 | ensure => present, 365 | mode => '0644', 366 | owner => 'jenkins', 367 | require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts/'], 368 | notify => Service['jenkins'], 369 | content => " 370 | 371 | 372 | Installation and upgrade tests for jenkins-debian-glue Debian packages 373 | false 374 | 375 | 376 | 377 | 378 | architecture 379 | 380 | ${::jdg_debian_arch} 381 | 382 | 383 | 384 | 385 | 386 | true 387 | false 388 | false 389 | false 390 | 391 | false 392 | 393 | 394 | jenkins-debian-glue-binaries/architecture=\$architecture 395 | *.deb 396 | artifacts/ 397 | 398 | true 399 | 400 | true 401 | 402 | 403 | # sadly piuparts always returns with exit code 1 :(( 404 | sudo jdg-piuparts-wrapper \${PWD}/artifacts/*.deb || true 405 | 406 | 407 | jdg-tap-piuparts piuparts.txt > piuparts.tap 408 | 409 | 410 | 411 | 412 | piuparts.tap 413 | false 414 | false 415 | false 416 | true 417 | false 418 | false 419 | 420 | 421 | piuparts.* 422 | false 423 | false 424 | 425 | 426 | 427 | 428 | false 429 | 430 | 431 | 432 | " 433 | } 434 | 435 | } 436 | 437 | ## software 438 | include jenkins::repos 439 | include jenkins::software 440 | include jenkins::config 441 | include jenkins::reprepro 442 | -------------------------------------------------------------------------------- /scripts/jdg-debc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat </dev/null 2>&1 ; then 10 | echo "Error: debc executable not available, please install the devscripts Debian package." >&2 11 | exit 1 12 | fi 13 | 14 | CHANGES=$(find . -maxdepth 1 -name \*.changes ! -name \*_source.changes) 15 | 16 | HOST_ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)" 17 | if [ -n "${HOST_ARCH}" ] && [ -n "${architecture}" ] && [ "${architecture}" != "${HOST_ARCH}" ] ; then 18 | arch="-a ${architecture}" 19 | fi 20 | 21 | if [ -n "$CHANGES" ] >/dev/null 2>&1 ; then 22 | for file in $CHANGES ; do 23 | debc ${arch} "$file" 24 | done 25 | elif ls ./*.deb >/dev/null 2>&1 ; then 26 | debc ${arch} ./*.deb 27 | else 28 | echo "No changes and deb files found in $(pwd), ignoring." 29 | fi 30 | -------------------------------------------------------------------------------- /scripts/jdg-generate-git-snapshot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z ${JENKINS_DEBIAN_GLUE_QUIET:-} ]; then 4 | set -x 5 | fi 6 | set -e 7 | set -u 8 | 9 | if [ -r /etc/jenkins/debian_glue ] ; then 10 | . /etc/jenkins/debian_glue 11 | fi 12 | 13 | [ -n "${DEBEMAIL:-}" ] || DEBEMAIL="jenkins-debian-glue Autobuilder " 14 | export DEBEMAIL 15 | 16 | [ -n "${SOURCE_DIRECTORY:-}" ] || SOURCE_DIRECTORY='source' # where checkout of sources resides 17 | 18 | if [ ! -d "${SOURCE_DIRECTORY}" ] ; then 19 | echo "Please run the script in the jenkins workspace." >&2 20 | echo 'NOTE: Make sure that "Source Code Management -> Git -> Additional Behaviours -> Check out to a sub-directory" is set to "source"' >&2 21 | exit 1 22 | fi 23 | 24 | if [ -z "${BUILD_NUMBER:-}" ] ; then 25 | echo "No BUILD_NUMBER defined, please run it in jenkins." >&2 26 | exit 1 27 | fi 28 | 29 | if [ -z "${GIT_COMMIT:-}" ] ; then 30 | echo "No GIT_COMMIT defined, please run it with git-plugin in jenkins. ">&2 31 | exit 1 32 | fi 33 | 34 | # since git-buildpackage >=0.6.24 only the gbp command is available 35 | if [ -x "$(which gbp)" ] ; then 36 | GBP_DCH="gbp dch" 37 | GBP_BUILDPACKAGE="gbp buildpackage" 38 | else 39 | GBP_DCH="git-dch" 40 | GBP_BUILDPACKAGE="git-buildpackage" 41 | fi 42 | 43 | JENKINS_DEBIAN_GLUE_VERSION=$(dpkg --list jenkins-debian-glue 2>/dev/null | awk '/^ii/ {print $3}') 44 | if [ -n "${JENKINS_DEBIAN_GLUE_VERSION:-}" ] ; then 45 | echo "*** Running jenkins-debian-glue version $JENKINS_DEBIAN_GLUE_VERSION ***" 46 | fi 47 | 48 | if [ -n "${DIST:-}" -a -z "${KEEP_SOURCE_CHANGES:-}" ]; then 49 | echo "*** Warning: DIST is set but KEEP_SOURCE_CHANGES is not, this doesn't make sense. ***" 50 | echo "*** Please consider setting KEEP_SOURCE_CHANGES=true when setting DIST. ***" 51 | 52 | if ! ${GBP_DCH} --help 2>&1 | grep -q -- --distribution ; then 53 | echo "Error: ${GBP_DCH} doesn't support the --distribution option. Upgrade git-buildpackage to version 0.6.7 or newer." >&2 54 | exit 1 55 | fi 56 | fi 57 | 58 | gbp_opts() { 59 | # support overriding git-buildpackage options 60 | if [ -n "${GBP_OPTS:-}" ] ; then 61 | echo "Found environment variable GBP_OPTS, set to ${GBP_OPTS}" 62 | else 63 | GBP_OPTS=" -nc --git-force-create --git-ignore-new --git-ignore-branch -S -us -uc --git-verbose --git-builder=/bin/true --git-cleaner=/bin/true --git-export-dir= " 64 | echo "Using git-buildpackage default options provided by jenkins-debian-glue" 65 | fi 66 | } 67 | 68 | version_information() { 69 | # required for dpkg-parsechangelog 70 | if ! [ -r debian/changelog ] ; then 71 | echo "Error: debian/changelog could not be read. Is this really a Debian package?" >&2 72 | return 1 73 | fi 74 | 75 | # retrieve and adjust information 76 | ORIG_VERSION=$(dpkg-parsechangelog --count 1 | awk '/^Version/ {print $2}') 77 | DISTRIBUTION=$(dpkg-parsechangelog --count 1 | awk '/^Distribution/ {print $2}') 78 | APPLY_VERSION_WORKAROUND=false 79 | 80 | if [ "${USE_ORIG_VERSION:-}" = "true" ] ; then 81 | echo "*** USE_ORIG_VERSION is set to 'true', keeping original version [${ORIG_VERSION}] from changelog ***" 82 | VERSION_STRING="${ORIG_VERSION}" 83 | else 84 | # we want to get a version string like 85 | # $ORIG_VERSION+0~$TIMESTAMP.$BUILD_NUMBER~1.$GIT_ID 86 | # so the version is always increasing over time, no matter what 87 | INCREASED_VERSION=$(jdg-increase-version-number $ORIG_VERSION) 88 | if [ -n "${TIMESTAMP_FORMAT:-}" ] ; then 89 | echo "*** Using custom timestamp format as specified by TIMESTAMP_FORMAT ***" 90 | TIMESTAMP="$(date -u +"$TIMESTAMP_FORMAT")" 91 | else 92 | TIMESTAMP="$(date -u +%Y%m%d%H%M%S)" 93 | fi 94 | BUILD_VERSION="${TIMESTAMP}.${BUILD_NUMBER}" # git-dch appends something like ~1.gbp5f433e then 95 | 96 | # we do NOT raise the version number, if we detect an unreleased version, 97 | # otherwise the released version would be older than our snapshot builds 98 | if [ "$DISTRIBUTION" = "UNRELEASED" ] && dpkg --compare-versions "$ORIG_VERSION" lt "$INCREASED_VERSION" ; then 99 | echo "*** Not increasing version number as distribution is set to UNRELEASED ***" 100 | INCREASED_VERSION="$ORIG_VERSION" 101 | 102 | if [ "${UNRELEASED_APPEND_COMMIT:-}" = "true" ]; then 103 | # However, as we will use plain 'dch' for this, we still want to have 104 | # the (short) GIT commit id inside the version... 105 | echo "*** UNRELEASED_APPEND_COMMIT is set to 'true', manually appending GIT commit to version number ***" 106 | BUILD_VERSION="${BUILD_VERSION}~${GIT_COMMIT:0:7}" 107 | fi 108 | APPLY_VERSION_WORKAROUND=true 109 | fi 110 | 111 | VERSION_STRING="${INCREASED_VERSION}~${BUILD_VERSION}" 112 | fi 113 | 114 | if [ -n "${distribution:-}" ] ; then 115 | echo "Distribution variable found. Adding distribution specific version." 116 | VERSION_STRING="${VERSION_STRING}+${distribution//-/_}" 117 | fi 118 | 119 | echo "*** Version string set to $VERSION_STRING ***" 120 | } 121 | 122 | # support overriding git-dch options 123 | dch_opts() { 124 | if [ -n "${DCH_OPTS:-}" ] ; then 125 | echo "Found environment variable DCH_OPTS, set to ${DCH_OPTS}" 126 | else 127 | DCH_OPTS="-S --multimaint-merge --ignore-branch" 128 | echo "Using default ${GBP_DCH} options (${DCH_OPTS})" 129 | fi 130 | DCH_COMBINED_OPTS="${DCH_OPTS}" 131 | 132 | # support overriding extra options for git-dch 133 | if [ -n "${DCH_EXTRA_OPTS:-}" ] ; then 134 | echo "Found environment variable DCH_EXTRA_OPTS, set to ${DCH_EXTRA_OPTS}" 135 | else 136 | DCH_EXTRA_OPTS="--new-version=${VERSION_STRING}" 137 | if [ -n "${DIST:-}" ]; then 138 | DCH_EXTRA_OPTS="${DCH_EXTRA_OPTS} --distribution ${DIST} --force-distribution" 139 | fi 140 | echo "Using extra ${GBP_DCH} options (${DCH_EXTRA_OPTS})" 141 | fi 142 | DCH_COMBINED_OPTS="${DCH_COMBINED_OPTS} ${DCH_EXTRA_OPTS}" 143 | 144 | if [ -n "${DCH_LOG_RESTRICTION:-}" ] ; then 145 | echo "Found environment variable DCH_LOG_RESTRICTION, set to ${DCH_LOG_RESTRICTION}" 146 | DCH_COMBINED_OPTS="${DCH_COMBINED_OPTS} ${DCH_LOG_RESTRICTION}" 147 | fi 148 | } 149 | 150 | # support overrides from gbp.conf 151 | gbp_conf() { 152 | 153 | if [ "${IGNORE_GBP_CONF:-}" = "true" ] ; then 154 | echo "Skipping gbp_conf execution as requested via IGNORE_GBP_CONF ***" 155 | return 0 156 | fi 157 | 158 | # List of config files in order 159 | gbp_conf_files=( 160 | /etc/git-buildpackage/gbp.conf 161 | ~/.gbp.conf 162 | .gbp.conf 163 | debian/gbp.conf 164 | .git/gbp.conf 165 | ) 166 | 167 | # Defaults 168 | UPSTREAM_BRANCH="upstream" 169 | DEBIAN_BRANCH="debian" 170 | PRISTINE_TAR="false" 171 | 172 | for gbp_conf_file in "${gbp_conf_files[@]}"; do 173 | if [ -f ${gbp_conf_file} ]; then 174 | local value; 175 | value=$(git config --file ${gbp_conf_file} --get DEFAULT.upstream-branch 2>&- || true) 176 | if [ -n "${value:-}" ]; then 177 | UPSTREAM_BRANCH=${value} 178 | fi 179 | 180 | value=$(git config --file ${gbp_conf_file} --get DEFAULT.debian-branch 2>&- || true) 181 | if [ -n "${value:-}" ]; then 182 | DEBIAN_BRANCH=${value} 183 | fi 184 | 185 | value=$(git config --file ${gbp_conf_file} --bool --get DEFAULT.pristine-tar 2>&- || true) 186 | if [ -n "${value:-}" ]; then 187 | PRISTINE_TAR=${value} 188 | fi 189 | fi 190 | done 191 | } 192 | 193 | create_local_branch() { 194 | [ -n "${1:-}" ] || return 1 195 | 196 | local BRANCH="$1" 197 | 198 | if git branch -a | grep -q "remotes/origin/${BRANCH}"'$' ; then 199 | git branch -D "${BRANCH}" || true 200 | git branch "${BRANCH}" "remotes/origin/${BRANCH}" 201 | else 202 | echo "NOTE: branch $BRANCH does not exist, ignoring request to checkout therefore." 203 | fi 204 | } 205 | 206 | git_dch_auto() { 207 | if $APPLY_VERSION_WORKAROUND ; then 208 | echo "Applying version workaround workaround" 209 | dch -b --distribution=UNRELEASED --newversion=$VERSION_STRING -- \ 210 | "SNAPSHOT autobuild for unreleased $ORIG_VERSION via jenkins-debian-glue." 211 | else 212 | ${GBP_DCH} --auto $DCH_COMBINED_OPTS ${DCH_CHANGELOG_FILE:-} 213 | fi 214 | } 215 | 216 | identify_latest_change() { 217 | # debian/changelog might be a symlink (e.g. because debian points to 218 | # pkg/debian), so make sure we don't access a non-existing file 219 | # by calling readlink 220 | git checkout -- $(readlink -f debian/changelog) 221 | 222 | local OLD_VERSION=$(dpkg-parsechangelog | awk '/^Version: / {print $2}') 223 | 224 | local last_tag=$(git describe $(git rev-list --tags='[^u]*' --max-count=1 HEAD)) 225 | local last_merge=$(git describe $(git rev-list --all --merges --max-count=1 HEAD)) 226 | local since=${last_tag} 227 | 228 | if [ -n "$last_merge" ] ; then 229 | local merge_date=$(git log ${last_merge} --pretty="format:%at" -1) 230 | local tag_date=$(git log ${last_tag} --pretty="format:%at" -1) 231 | if [ ${merge_date} -gt ${tag_date} ] ; then 232 | local since=${last_merge} 233 | fi 234 | fi 235 | 236 | echo "Latest tag [${last_tag:-}] / merge [${last_merge:-}] seems to be $since" 237 | ${GBP_DCH} -s "${since}" $DCH_COMBINED_OPTS ${DCH_CHANGELOG_FILE:-} 238 | 239 | local NEW_VERSION=$(dpkg-parsechangelog | awk '/^Version: / {print $2}') 240 | 241 | if dpkg --compare-versions "$NEW_VERSION" lt "$OLD_VERSION" ; then 242 | echo "Calculated version is older than last release, falling back to auto mode." 243 | # debian/changelog might be a symlink (e.g. because debian points to 244 | # pkg/debian), so make sure we don't access a non-existing file 245 | # by calling readlink 246 | git checkout -- $(readlink -f debian/changelog) 247 | 248 | git_dch_auto 249 | fi 250 | } 251 | 252 | branch_checkout() { 253 | # git-dch and git-buildpackage refuse to operate on a single git 254 | # commit, so instead create a temporary branch to work on 255 | random_branch="jenkins-debian-glue-buildbranch$RANDOM" 256 | 257 | if [ "${SKIP_BRANCH_AND_TAG_HANDLING:-}" = "true" ] ; then 258 | echo "*** Skipping branch/tag handling as requested via SKIP_BRANCH_AND_TAG_HANDLING ***" 259 | 260 | echo "Making sure that random_branch $random_branch does not exist" 261 | git branch -D "$random_branch" || true 262 | 263 | echo "Checking out branch $random_branch based on git commit $GIT_COMMIT" 264 | git checkout -b "$random_branch" "$GIT_COMMIT" 265 | elif [ -n "${GERRIT_PATCHSET_REVISION:-}" ] ; then 266 | echo "*** We seem to be building for Gerrit ***" 267 | 268 | echo "Making sure that random_branch $random_branch does not exist" 269 | git branch -D "$random_branch" || true 270 | 271 | echo "*** Fetching Gerrit patchsets/commits from ${GIT_URL} ***" 272 | git fetch --tags --progress ${GIT_URL} +refs/changes/*:refs/remotes/origin/* 273 | 274 | echo "Checking out branch $random_branch based on Gerrit patchset revision ${GERRIT_PATCHSET_REVISION} ***" 275 | git checkout -b "$random_branch" "$GERRIT_PATCHSET_REVISION" 276 | elif [ -n "${tag:-}" ] && [ "${tag:-}" != "none" ] ; then 277 | echo "Making sure that random_branch $random_branch does not exist" 278 | git branch -D "$random_branch" || true 279 | 280 | echo "Checking out branch $random_branch based on tag $tag" 281 | git checkout -b "$random_branch" "$tag" 282 | elif [ -n "${branch:-}" ] ; then 283 | # prepend "origin" when checking out a branch, otherwise we might be 284 | # checking out a branch which doesn't exist locally yet, failing with: 285 | # | fatal: git checkout: updating paths is incompatible with switching branches. 286 | # | Did you intend to checkout '$BRANCH' which can not be resolved as commit? 287 | local checkout_branch 288 | 289 | case "$branch" in 290 | # rewrite refs/heads/FOO to refs/remotes/origin/FOO, otherwise it fails; 291 | # the refs/heads/FOO is something e.g. github pushes through its API 292 | refs/heads/*) checkout_branch="${branch/refs\/heads/refs/remotes/origin}" ;; 293 | 294 | # keep as it is when receiving origin/* already 295 | origin/*) checkout_branch="$branch" ;; 296 | 297 | # prepend "origin/" otherwise 298 | *) checkout_branch="origin/${branch}" ;; 299 | esac 300 | 301 | echo "Making sure that random_branch $random_branch does not exist" 302 | git branch -D "$random_branch" || true 303 | 304 | echo "Checking out branch $random_branch based on branch $checkout_branch" 305 | git checkout -b "$random_branch" "$checkout_branch" 306 | else 307 | echo "Making sure that random_branch $random_branch does not exist" 308 | git branch -D "$random_branch" || true 309 | 310 | echo "Checking out branch $random_branch based on commit $GIT_COMMIT" 311 | git checkout -b "$random_branch" "$GIT_COMMIT" 312 | fi 313 | } 314 | 315 | changelog_generation() { 316 | # Allow skipping of changelog creation, e.g. to build a branch as-is 317 | if [ "${SKIP_DCH:-}" = "true" ] ; then 318 | echo "*** SKIP_DCH is set, not modifying debian/changelog therefore ***" 319 | else 320 | if [ -n "${tag:-}" ] && [ "${tag:-}" != "none" ] ; then 321 | echo "Tag parameter found (and not set to 'none'), not touching the changelog." 322 | elif [ "${1:-}" = "identify" ] ; then 323 | echo "Trying to identify latest tag / merge..." 324 | 325 | if ! git describe $(git rev-list --tags='[^u]*' --max-count=1 HEAD) >/dev/null ; then 326 | echo "Failed to identify latest change, falling back to auto mode." 327 | git_dch_auto 328 | else 329 | identify_latest_change 330 | fi 331 | elif [ -r debian/gbp.conf ] ; then 332 | echo "Found debian/gbp.conf, using ${GBP_DCH} with auto mode." 333 | git_dch_auto 334 | else 335 | echo "Using ${GBP_DCH} with auto mode." 336 | git_dch_auto 337 | fi 338 | 339 | # get rid of "UNRELEASED" distribution header, only 340 | # necessary if the debian/changelog was modified 341 | if [ -z "${tag:-}" ]; then 342 | local debchange_opts 343 | if [ -n "${DIST:-}" ]; then 344 | debchange_opts="--distribution ${DIST} --force-distribution" 345 | fi 346 | debchange --release ${debchange_opts:-} "" 347 | fi 348 | fi 349 | } 350 | 351 | git_cleanup() { 352 | if [ -n "${SKIP_GIT_CLEANUP:-}" ] ; then 353 | echo "*** Skipping git_cleanup as requested via SKIP_GIT_CLEANUP ***" 354 | return 0 355 | fi 356 | 357 | echo "*** Cleaning git repository to make sure there are no modified files ***" 358 | echo "*** Note: You can skip this step by setting SKIP_GIT_CLEANUP=true ***" 359 | git clean -fxd 360 | git reset --hard HEAD 361 | } 362 | 363 | quilt_cleanup() { 364 | if [ -n "${SKIP_QUILT_CLEANUP:-}" ] ; then 365 | echo "*** Skipping quilt_cleanup as requested via SKIP_QUILT_CLEANUP ***" 366 | return 0 367 | fi 368 | 369 | echo "*** Unapplying all possibly applied quilt patches and removing quilt directory ***" 370 | echo "*** Note: You can skip this step by setting SKIP_QUILT_CLEANUP=true ***" 371 | quilt pop -a || true 372 | rm -rf .pc 373 | } 374 | 375 | identify_source_build_opts() { 376 | # unset by default 377 | DBP_OPTS="" 378 | 379 | if [ -r "debian/source/format" ] && ! grep -q '^1\.0' debian/source/format ; then 380 | echo "*** Found dpkg source format != 1.0, nothing to do ****" 381 | return 0 382 | fi 383 | 384 | if [ -r "debian/source/options" ] ; then 385 | if ! grep -q '^[[:space:]]*tar-ignore' "debian/source/options" ; then 386 | echo "*** Enabling '-I' option as tar-ignore option not present in debian/source/options ***" 387 | DBP_OPTS+=" -I" 388 | fi 389 | 390 | # note: we shouldn't match on 'extend-diff-ignore' 391 | if ! grep -q '^[[:space:]]*diff-ignore' "debian/source/options" ; then 392 | echo "*** Enabling '-i' option as diff-ignore option not present in debian/source/options ***" 393 | DBP_OPTS+=" -i" 394 | fi 395 | else 396 | echo "*** Enabling '-i -I' options as building for dpkg source format 1.0 ***" 397 | DBP_OPTS="-i -I" 398 | fi 399 | } 400 | 401 | source_format_opts() { 402 | if ! [ -f "debian/source/format" ] ; then 403 | echo '*** WARNING: Source format is not specified in debian/source/format! ***' 404 | return 0 405 | fi 406 | 407 | local SRC_FORMAT="$(cat debian/source/format)" 408 | 409 | case "$SRC_FORMAT" in 410 | '3.0 (quilt)') 411 | echo "*** Source format detected as 3.0 (quilt) ***"; 412 | DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--unapply-patches" 413 | ;; 414 | '3.0 (git)') 415 | echo "*** Source format detected as 3.0 (git) ***" 416 | PRISTINE_TAR=false 417 | SKIP_QUILT_CLEANUP=true 418 | IGNORE_GIT_BUILDPACKAGE=true 419 | ;; 420 | '3.0 (native)') 421 | echo "*** Source format detected as 3.0 (native) ***" 422 | ;; 423 | '3.0') 424 | echo "*** Source format detected as 3.0 ***" 425 | ;; 426 | '1.0') 427 | echo "*** Source format detected as 1.0 ***" 428 | SKIP_QUILT_CLEANUP=true 429 | ;; 430 | *) 431 | echo "*** WARNING: invalid or unknown source format: ${SRC_FORMAT} ***" 432 | ;; 433 | esac 434 | } 435 | 436 | # main execution 437 | echo "*** source package build phase ***" 438 | 439 | if [ -n "${SKIP_PRE_CLEANUP:-}" ] ; then 440 | echo '*** SKIP_PRE_CLEANUP is set ***' 441 | else 442 | rm -f ./* || true 443 | fi 444 | 445 | if [ -n "${PRE_SOURCE_HOOK:-}" ] ; then 446 | echo "*** Found environment variable PRE_SOURCE_HOOK, set to ${PRE_SOURCE_HOOK:-} ***" 447 | sh ${PRE_SOURCE_HOOK:-} 448 | fi 449 | 450 | cd "$SOURCE_DIRECTORY" 451 | 452 | git_cleanup 453 | source_format_opts 454 | identify_source_build_opts 455 | 456 | # Only if we are using git-buildpackage... 457 | if [ "${IGNORE_GIT_BUILDPACKAGE:-}" != "true" ] ; then 458 | # gbp.conf handling 459 | gbp_conf 460 | 461 | # make sure common branches are available for git-buildpackage 462 | create_local_branch ${UPSTREAM_BRANCH} 463 | create_local_branch ${DEBIAN_BRANCH} 464 | if [ ${PRISTINE_TAR} = 'true' ]; then 465 | create_local_branch pristine-tar 466 | fi 467 | fi 468 | 469 | # check out the according branch/tag with help of $random_branch 470 | branch_checkout 471 | 472 | if [ -n "${PRE_DCH_HOOK:-}" ] ; then 473 | echo "*** Found environment variable PRE_DCH_HOOK, set to ${PRE_DCH_HOOK:-} ***" 474 | sh ${PRE_DCH_HOOK:-} 475 | fi 476 | 477 | # retrieve version information *after* checking out the according branch/tag, 478 | # otherwise version number might result in something different than expected 479 | version_information 480 | 481 | # handling of debian/changelog 482 | dch_opts 483 | changelog_generation 484 | 485 | # prepare orig.tar.gz using pristine-tar, but without actually building the source package 486 | if [ "${IGNORE_GIT_BUILDPACKAGE:-}" = "true" ] ; then 487 | echo "Skipping git-buildpackage execution as requested via IGNORE_GIT_BUILDPACKAGE ***" 488 | else 489 | gbp_opts # set $GBP_OPTS 490 | ${GBP_BUILDPACKAGE} ${GBP_OPTS:-} 491 | fi 492 | 493 | quilt_cleanup 494 | 495 | # build source package, run before switching back to previous branch 496 | # to get the actual requested version 497 | dpkg-buildpackage -uc -us -nc -d -S ${DBP_OPTS:-} ${DBP_EXTRA_OPTS:-} 498 | 499 | if [ -n "${KEY_ID:-}" ] ; then 500 | echo "*** Found environment variable KEY_ID, set to ${KEY_ID:-}, signing source package ***" 501 | 502 | if ! [ -x "$(which debsign)" ] ; then 503 | echo "Error: debsign not available, please make sure the devscripts package is installed." >&2 504 | exit 1 505 | fi 506 | 507 | debsign -k"${KEY_ID:-}" ../*_source.changes 508 | fi 509 | 510 | if [ -n "${KEEP_SOURCE_CHANGES:-}" ]; then 511 | echo "*** Not removing ../*_source.changes because KEEP_SOURCE_CHANGES is set ***" 512 | else 513 | echo "*** Removing ../*_source.changes because KEEP_SOURCE_CHANGES is not set ***" 514 | # get rid of the *_source.changes files generated by dpkg-buildpackage, 515 | # to avoid failures in a later stage when copying *all* files around 516 | rm -f ../*_source.changes 517 | fi 518 | 519 | # revert to original debian/changelog to avoid merge conflicts 520 | git checkout -- $(readlink -f debian/changelog) 521 | 522 | # switch back to previous "branch" before removing the tmp branch 523 | if ! git checkout -f "${GIT_BRANCH}"; then 524 | # we were probably detached 525 | git checkout -f "${GIT_COMMIT}" 526 | fi 527 | git branch -D "$random_branch" 528 | 529 | # vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2 530 | -------------------------------------------------------------------------------- /scripts/jdg-generate-reprepro-codename: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z ${JENKINS_DEBIAN_GLUE_QUIET:-} ]; then 4 | set -x 5 | fi 6 | set -e 7 | 8 | bailout() { 9 | [ -n "${1:-}" ] && EXIT="${1}" || EXIT=0 10 | [ -n "${2:-}" ] && echo "$2" >&2 11 | rm -f /var/lock/jdg-generate-reprepro-codename."$(id -un)" 12 | exit $EXIT 13 | } 14 | 15 | # backwards compatibility, see PR#94 16 | if [ -z "${REPOSITORY:-}" ] ; then 17 | repository_is_missing_in_env=true 18 | else 19 | repository_is_missing_in_env=false 20 | fi 21 | 22 | if [ -r /etc/jenkins/debian_glue ] ; then 23 | echo "*** Sourcing /etc/jenkins/debian_glue ***" 24 | . /etc/jenkins/debian_glue 25 | fi 26 | 27 | # backwards compatibility, see PR#94 28 | if [ -n "${REPOSITORY:-}" ] && $repository_is_missing_in_env ; then 29 | echo "*** WARNING: 'REPOSITORY' set in /etc/jenkins/debian_glue but should be DEFAULT_REPOSITORY ***" 30 | echo "*** WARNING: Setting DEFAULT_REPOSITORY to $REPOSITORY for backwards compatibility ***" 31 | echo "*** WARNING: Please replace REPOSITORY=... in /etc/jenkins/debian_glue with DEFAULT_REPOSITORY=... ***" 32 | DEFAULT_REPOSITORY="${REPOSITORY}" 33 | fi 34 | 35 | if [ "${BUILD_ONLY:-}" = "true" ] ; then 36 | echo "BUILD_ONLY is set to true, ignoring request to generate local repository." 37 | exit 0 38 | fi 39 | 40 | ARCHITECTURES="${ARCHITECTURES:-amd64 i386 source}" 41 | COMPONENTS="${COMPONENTS:-main}" 42 | UDEB_COMPONENTS="${UDEB_COMPONENTS:-main}" 43 | 44 | usage() { 45 | echo "Usage: $0" \ 46 | "[ --architectures ]" \ 47 | "[ --components ]" \ 48 | "[ --udeb-components ]" \ 49 | "[ --origin ]" \ 50 | "[ --suite ]" \ 51 | "[ --label