Merge jenkaas-jobs:add-debhelper-and-custom-install into jenkaas-jobs:master

Proposed by Michał Sawicz
Status: Merged
Approved by: Olivier Tilloy
Approved revision: c6879497d2e248ed37261cd543a122bd224bdfd0
Merged at revision: c6879497d2e248ed37261cd543a122bd224bdfd0
Proposed branch: jenkaas-jobs:add-debhelper-and-custom-install
Merge into: jenkaas-jobs:master
Diff against target: 122 lines (+18/-5)
5 files modified
jenkaas_jobs/yaml/prepare/prepare-0-install.sh (+3/-0)
jenkaas_jobs/yaml/prepare/prepare-0-install.yaml (+2/-1)
project-example.yaml (+6/-1)
tests/fixtures/prepare/prepare-0-install.xml (+6/-3)
tests/project.yaml (+1/-0)
Reviewer Review Type Date Requested Status
Olivier Tilloy (community) Approve
Review via email: mp+291098@code.launchpad.net

Commit message

Add debhelper and allow specifying a custom set of additional packages

To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

LGTM, thanks!

review: Approve
Revision history for this message
Olivier Tilloy (osomon) wrote :

Tested the addition of debhelper, works fine.
Not tested install_packages yet, will do asap.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Tested install_packages, works as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jenkaas_jobs/yaml/prepare/prepare-0-install.sh b/jenkaas_jobs/yaml/prepare/prepare-0-install.sh
2index cc06eb5..3fb302a 100644
3--- a/jenkaas_jobs/yaml/prepare/prepare-0-install.sh
4+++ b/jenkaas_jobs/yaml/prepare/prepare-0-install.sh
5@@ -22,6 +22,7 @@ sudo apt update
6 # autopkgtest to run autopkgtests
7 # bzr-builddeb for building source packages
8 # ccache to prepare the shared ccache dir
9+# debhelper for debian/rules clean
10 # debootstrap to create the chroots
11 # fakeroot needed by package builds
12 # python3 modules for python-based steps
13@@ -33,6 +34,7 @@ sudo apt-get install --yes \
14 autopkgtest/trusty-backports \
15 bzr-builddeb \
16 ccache \
17+ debhelper \
18 debootstrap \
19 fakeroot \
20 python3-requests \
21@@ -40,6 +42,7 @@ sudo apt-get install --yes \
22 schroot \
23 ubuntu-dev-tools \
24 unzip \
25+ {install_packages}
26
27 mkdir -p steps
28 touch steps/0-install-v{job_version}
29diff --git a/jenkaas_jobs/yaml/prepare/prepare-0-install.yaml b/jenkaas_jobs/yaml/prepare/prepare-0-install.yaml
30index 6e23c24..42c6d1f 100644
31--- a/jenkaas_jobs/yaml/prepare/prepare-0-install.yaml
32+++ b/jenkaas_jobs/yaml/prepare/prepare-0-install.yaml
33@@ -1,7 +1,8 @@
34 - job-template:
35 name: prepare-0-install
36+ install_packages: ''
37 # NOTE: make sure to bump this whenever this job is updated
38- job_version: 10
39+ job_version: 11
40 project-type: matrix
41 description: |
42 This job adds all the needed repositories and installs dependencies needed
43diff --git a/project-example.yaml b/project-example.yaml
44index 09b8817..dceb47a 100644
45--- a/project-example.yaml
46+++ b/project-example.yaml
47@@ -27,7 +27,12 @@
48 # This needs to be a comma-separated list of quoted LP teams and/or users.
49 allowed_users: |
50 "your-ci-team", "someone-else"
51-
52+
53+ # A space-separated list of packages to install on build slaves in addition
54+ # to the default list. Use this if, for example, your debian/rules clean
55+ # target needs something specific.
56+ install_packages: ''
57+
58 # The list of all slaves available in your jenkins instance. Currently only
59 # the run-commands job uses that list.
60 all_slaves:
61diff --git a/tests/fixtures/prepare/prepare-0-install.xml b/tests/fixtures/prepare/prepare-0-install.xml
62index ff3d50b..7620360 100644
63--- a/tests/fixtures/prepare/prepare-0-install.xml
64+++ b/tests/fixtures/prepare/prepare-0-install.xml
65@@ -47,7 +47,7 @@ on build slaves.
66 <org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder plugin="conditional-buildstep@1.3.3">
67 <condition class="org.jenkins_ci.plugins.run_condition.logic.Not" plugin="run-condition@1.0">
68 <condition class="org.jenkins_ci.plugins.run_condition.core.FileExistsCondition">
69- <file>steps/0-install-v10</file>
70+ <file>steps/0-install-v11</file>
71 <baseDir class="org.jenkins_ci.plugins.run_condition.common.BaseDirectory$Workspace"/>
72 </condition>
73 </condition>
74@@ -76,6 +76,7 @@ sudo apt update
75 # autopkgtest to run autopkgtests
76 # bzr-builddeb for building source packages
77 # ccache to prepare the shared ccache dir
78+# debhelper for debian/rules clean
79 # debootstrap to create the chroots
80 # fakeroot needed by package builds
81 # python3 modules for python-based steps
82@@ -87,6 +88,7 @@ sudo apt-get install --yes \
83 autopkgtest/trusty-backports \
84 bzr-builddeb \
85 ccache \
86+ debhelper \
87 debootstrap \
88 fakeroot \
89 python3-requests \
90@@ -94,9 +96,10 @@ sudo apt-get install --yes \
91 schroot \
92 ubuntu-dev-tools \
93 unzip \
94+ additional-package
95
96 mkdir -p steps
97-touch steps/0-install-v10
98+touch steps/0-install-v11
99 </command>
100 </buildStep>
101 <runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail" plugin="run-condition@1.0"/>
102@@ -106,7 +109,7 @@ touch steps/0-install-v10
103 <buildWrappers>
104 <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.7.2"/>
105 <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.3">
106- <template>v10</template>
107+ <template>v11</template>
108 </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter>
109 </buildWrappers>
110 <executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
111diff --git a/tests/project.yaml b/tests/project.yaml
112index 72458fb..d0892af 100644
113--- a/tests/project.yaml
114+++ b/tests/project.yaml
115@@ -4,6 +4,7 @@
116 bot_username: test-ci-bot
117 bot_email: Test CI Bot <test@your-jenkins.com>
118 allowed_users: '"test-ci-team"'
119+ install_packages: additional-package
120 all_slaves:
121 - jenkins-slave-2
122 - cyclops-node02

Subscribers

People subscribed via source and target branches

to all changes: