Merge lp:~canonical-platform-qa/qa-jenkins-jobs/auto_ci-land_upgrade_testing into lp:qa-jenkins-jobs

Proposed by Christopher Lee
Status: Merged
Approved by: Max Brustkern
Approved revision: 27
Merged at revision: 38
Proposed branch: lp:~canonical-platform-qa/qa-jenkins-jobs/auto_ci-land_upgrade_testing
Merge into: lp:qa-jenkins-jobs
Prerequisite: lp:~canonical-platform-qa/qa-jenkins-jobs/adding-autopilot-autolanding
Diff against target: 170 lines (+46/-25)
1 file modified
mp-ci-autoland/ci-jobs.yaml (+46/-25)
To merge this branch: bzr merge lp:~canonical-platform-qa/qa-jenkins-jobs/auto_ci-land_upgrade_testing
Reviewer Review Type Date Requested Status
Max Brustkern (community) Approve
Review via email: mp+288228@code.launchpad.net

This proposal supersedes a proposal from 2016-03-04.

Commit message

Template autolanding and ci jobs to add auto-upgrade-testing.

Description of the change

Template autolanding and ci jobs to add auto-upgrade-testing.

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote : Posted in a previous version of this proposal

We've talked about creating separate macros files. Would this be a good time to start that, since we're directly reusing a lot of code from other jobs? It seems like otherwise, some of these job names will overlap as well. Even if we don't go as far as making a generic macros file, maybe making a generic autolanding job set would work.

Revision history for this message
Christopher Lee (veebers) wrote :

Sorry Max, I forgot to set the pre-req. branch. There isn't as much duplication as the diff lead us to believe.

I have a plan to simplify things a little further still.

Revision history for this message
Max Brustkern (nuclearbob) wrote :

Looks good.

review: Approve
28. By Christopher Lee

Merge parent

29. By Christopher Lee

Merge parent

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mp-ci-autoland/ci-jobs.yaml'
2--- mp-ci-autoland/ci-jobs.yaml 2016-03-07 23:19:26 +0000
3+++ mp-ci-autoland/ci-jobs.yaml 2016-03-07 23:19:26 +0000
4@@ -195,9 +195,13 @@
5 name: 'ci-details'
6 jobs:
7 - 'build-{dist}-{arch}-package'
8- - 'trigger-autopilot-ci'
9- - 'autopilot-ci'
10+ - 'trigger-{target_project}-ci'
11+ - '{target_project}-ci'
12 - 'generic-update-mp'
13+ target_project:
14+ # Must be projects lp:<name>
15+ - 'autopilot'
16+ - 'auto-upgrade-testing'
17 dist:
18 - wily
19 arch:
20@@ -230,16 +234,16 @@
21 description: 'The revision of the processed branch'
22
23 - job-template:
24- name: 'trigger-autopilot-ci'
25+ name: 'trigger-{target_project}-ci'
26 description: |
27- Poll and trigger autopilot-ci when there is a new MP that needs it.
28+ Poll and trigger {target_project}-ci when there is a new MP that needs it.
29 node: 'jenkins-slave-2'
30 triggers:
31 - timed: 'H/5 * * * *'
32 builders:
33 - shell: |
34- BRANCH_NAME=lp:autopilot
35- TARGET_JOB=autopilot-ci
36+ BRANCH_NAME=lp:{target_project}
37+ TARGET_JOB={target_project}-ci
38 # TARGET_JOB needs to already exist.
39
40 launchpadTrigger --lock-name=$JOB_NAME --job=$TARGET_JOB --branch=$BRANCH_NAME --trigger-ci
41@@ -247,16 +251,16 @@
42 exit 0
43
44 - job-template:
45- name: 'autopilot-ci'
46+ name: '{target_project}-ci'
47 description: |
48- Build packages and run tests for an Autopilot merge proposal
49+ Build packages and run tests for an {target_project} merge proposal
50 node: 'jenkins-slave-2'
51 # This token is the string that was setup for the launchpad bot.
52 auth-token: BUILD_ME
53 builders:
54 - trigger-deb-builders:
55 landing_candidate: {landing_candidate}
56- target_branch: 'lp:autopilot'
57+ target_branch: 'lp:{target_project}'
58 hooks: 'H05set_package_version H10strip_native_depends'
59 parallelism: 1
60 - upcopy-i386-from-downstream
61@@ -317,6 +321,7 @@
62 description: |
63 Build a debian package for {dist} - {arch}.
64 node: 'jenkins-slave-2'
65+ # TODO: Explore if concurrent will work for us.
66 # concurrent: 'true' ?
67 parameters:
68 - string:
69@@ -344,15 +349,23 @@
70 - collect-debs
71
72 - project:
73- name: 'autopilot-autolanding'
74- # Make this paramatised perhaps
75+ name: 'project-autolanding'
76+ description: |
77+ Autolanding jobs for projects in QA control
78 jobs:
79- - 'autopilot-autoland'
80- - 'trigger-autopilot-autoland'
81+ - '{target_project}-autoland'
82+ - 'trigger-{target_project}-autoland'
83 - 'generic-land-mp'
84-
85+ target_project:
86+ # Must be lp:<name>
87+ - 'autopilot'
88+ - 'auto-upgrade-testing'
89+
90 - job-template:
91- name: 'autopilot-autoland'
92+ name: '{target_project}-autoland'
93+ description: |
94+ Gets triggered when a MP exists that meets autoland criteria. Merges with
95+ {target_project} trunk.
96 node: 'jenkins-slave-2'
97 # This token is the string that was setup for the launchpad bot.
98 auth-token: BUILD_ME
99@@ -369,18 +382,20 @@
100 builders:
101 - trigger-deb-builders:
102 landing_candidate: {landing_candidate}
103- target_branch: 'lp:autopilot'
104+ target_branch: 'lp:{target_project}'
105 hooks: 'H05set_package_version H10strip_native_depends'
106 parallelism: 1
107 - 'trigger-generic-land-mp'
108 publishers:
109 - 'trigger-generic-land-mp-failed'
110-
111+
112 - builder:
113 name: 'trigger-generic-land-mp'
114+ description: |
115+ Run when an autolanding job succeeds to update the MP with the success details.
116 builders:
117 - trigger-builds:
118- - project:
119+ - project:
120 - 'generic-land-mp'
121 block: 'true'
122 predefined-parameters: |
123@@ -393,12 +408,14 @@
124 build-step-failure-threshold: 'never'
125 unstable-threshold: 'never'
126 failure-threshold: 'never'
127-
128+
129 - publisher:
130 name: 'trigger-generic-land-mp-failed'
131+ description: |
132+ Run when an autolanding job fails to update the MP with the failure details.
133 publishers:
134 - trigger-parameterized-builds:
135- - project:
136+ - project:
137 - 'generic-land-mp'
138 condition: 'UNSTABLE_OR_WORSE'
139 predefined-parameters: |
140@@ -407,21 +424,25 @@
141 ci_branch=$landing_candidate
142 ci_merge_proposal=$merge_proposal
143 ci_revision=$candidate_revision
144-
145+
146 - job-template:
147- name: 'trigger-autopilot-autoland'
148+ name: 'trigger-{target_project}-autoland'
149+ description: |
150+ Poll and trigger {target_project}-ci when there is a new MP that needs it.
151 node: 'jenkins-slave-2'
152 triggers:
153 - timed: 'H/5 * * * *'
154 builders:
155 - shell: |
156- BRANCH_NAME=lp:autopilot
157- TARGET_JOB=autopilot-autoland
158+ BRANCH_NAME=lp:{target_project}
159+ TARGET_JOB={target_project}-autoland
160
161 launchpadTrigger --lock-name=$JOB_NAME --job=$TARGET_JOB --branch=$BRANCH_NAME --autoland
162-
163+
164 - job-template:
165 name: 'generic-land-mp'
166+ description: |
167+ Updates a MP with the autoland results (Success/Failure)
168 node: 'jenkins-slave-2'
169 parameters:
170 - string:

Subscribers

People subscribed via source and target branches