df826a09d0f2264882ecc63a3dd7cad73b137cbe
[releng.git] / jjb / genesis / genesis.yml
1 - project:
2
3     name: genesis
4
5     installer:
6         - foreman
7         - fuel
8         - opensteak
9     jobs:
10         - 'genesis-{installer}-verify'
11         - 'genesis-{installer}-merge'
12         - 'genesis-{installer}-daily-master'
13
14     # stream:    branch with - in place of / (eg. stable-helium)
15     # branch:    branch (eg. stable/helium)
16     stream:
17         - master:
18             branch: 'master'
19
20     project: 'genesis'
21
22 ########################
23 # job templates
24 ########################
25
26 - job-template:
27     name: 'genesis-{installer}-verify'
28
29     project-type: freestyle
30
31     node: ericsson-build
32
33     logrotate:
34         daysToKeep: 30
35         numToKeep: 10
36         artifactDaysToKeep: -1
37         artifactNumToKeep: -1
38
39     parameters:
40         - string:
41             name: BUILD_DIRECTORY
42             default: $WORKSPACE/build_output
43         - project-parameter:
44             project: '{project}'
45         - gerrit-parameter:
46             branch: 'master'
47
48     scm:
49         - gerrit-trigger-scm:
50             credentials-id: '{ssh-credentials}'
51             url: https://gerrit.opnfv.org/gerrit/genesis
52             refspec: '$GERRIT_REFSPEC'
53             choosing-strategy: 'gerrit'
54
55     wrappers:
56         - ssh-agent-credentials:
57             user: '{ssh-credentials}'
58
59     triggers:
60         - gerrit:
61             trigger-on:
62                 - patchset-created-event:
63                     exclude-drafts: 'false'
64                     exclude-trivial-rebase: 'false'
65                     exclude-no-code-change: 'false'
66                 - draft-published-event
67                 - comment-added-contains-event:
68                     comment-contains-value: 'recheck'
69                 - comment-added-contains-event:
70                     comment-contains-value: 'reverify'
71             projects:
72               - project-compare-type: 'ANT'
73                 project-pattern: 'genesis'
74                 branches:
75                   - branch-compare-type: 'ANT'
76                     branch-pattern: '**/master'
77                 file-paths:
78                   - compare-type: ANT
79                     pattern: 'common/**'
80                   - compare-type: ANT
81                     pattern: '{installer}/**'
82
83
84     builders:
85         - '{installer}-verify'
86
87 - job-template:
88     name: 'genesis-{installer}-merge'
89
90     # builder-merge job to run JJB update
91     #
92     # This job's purpose is to update all the JJB
93
94     project-type: freestyle
95
96     node: ericsson-build
97
98     logrotate:
99         daysToKeep: 30
100         numToKeep: 40
101         artifactDaysToKeep: -1
102         artifactNumToKeep: 5
103
104     parameters:
105         - string:
106             name: BUILD_DIRECTORY
107             default: $WORKSPACE/build_output
108         - project-parameter:
109             project: '{project}'
110         - gerrit-parameter:
111             branch: 'master'
112
113     scm:
114         - gerrit-trigger-scm:
115             credentials-id: '{ssh-credentials}'
116             url: https://gerrit.opnfv.org/gerrit/genesis
117             refspec: ''
118             choosing-strategy: 'default'
119
120     wrappers:
121         - ssh-agent-credentials:
122             user: '{ssh-credentials}'
123
124     triggers:
125         - gerrit:
126             trigger-on:
127                 - change-merged-event
128                 - comment-added-contains-event:
129                     comment-contains-value: 'remerge'
130             projects:
131               - project-compare-type: 'ANT'
132                 project-pattern: 'genesis'
133                 branches:
134                     - branch-compare-type: 'ANT'
135                       branch-pattern: '**/master'
136                 file-paths:
137                   - compare-type: ANT
138                     pattern: 'common/**'
139                   - compare-type: ANT
140                     pattern: '{installer}/**'
141
142     builders:
143         - '{installer}-merge'
144
145 - job-template:
146     name: 'genesis-{installer}-daily-master'
147
148     project-type: freestyle
149
150     disabled: true
151
152     node: ericsson-build
153
154     parameters:
155         - string:
156             name: BUILD_DIRECTORY
157             default: $WORKSPACE/build_output
158         - string:
159             name: INSTALLER
160             default: '{installer}'
161             description: "Installer to use."
162         - string:
163             name: GERRIT_BRANCH
164             default: origin/master
165             description: "Branch to build, deploy and test."
166         - string:
167             name: GERRIT_REFSPEC
168             default: refs/heads/master
169             description: "Refspec to retrieve."
170
171     scm:
172         - git:
173             skip-tag: true
174             url: https://gerrit.opnfv.org/gerrit/genesis
175             branches:
176                 - $GERRIT_BRANCH
177             refspec: $GERRIT_REFSPEC
178
179     triggers:
180         - pollscm: '@midnight'
181
182     logrotate:
183         daysToKeep: 30
184         numToKeep: 10
185         artifactDaysToKeep: -1
186         artifactNumToKeep: -1
187
188     builders:
189         - '{installer}-daily-master'
190
191 ########################
192 # builder macros
193 ########################
194 - builder:
195     name: foreman-verify
196     builders:
197         - shell: |
198             #!/bin/bash
199
200             echo "Hello World!"
201
202 - builder:
203     name: foreman-merge
204     builders:
205         - shell: |
206             #!/bin/bash
207
208             echo "Hello World!"
209
210 - builder:
211     name: foreman-daily-master
212     builders:
213         - shell: |
214             #!/bin/bash
215
216             echo "Hello World!"
217
218 - builder:
219     name: fuel-verify
220     builders:
221         - shell: |
222             #!/bin/bash
223             set -o errexit
224             set -o nounset
225             set -o pipefail
226             set -x
227
228             cd $WORKSPACE/fuel/ci
229             ./build.sh $BUILD_DIRECTORY
230             ls -al $BUILD_DIRECTORY
231
232 - builder:
233     name: fuel-merge
234     builders:
235         - shell: |
236             #!/bin/bash
237             set -o errexit
238             set -o nounset
239             set -o pipefail
240             set -x
241
242             cd $WORKSPACE/fuel/ci
243             ./build.sh -f t $BUILD_DIRECTORY
244             ls -al $BUILD_DIRECTORY
245
246 - builder:
247     name: fuel-daily-master
248     builders:
249         - shell: |
250             #!/bin/bash
251             set -o errexit
252             set -o nounset
253             set -o pipefail
254             set -x
255
256             cd $WORKSPACE/fuel/ci
257             ./build.sh -f t $BUILD_DIRECTORY
258             ls -al $BUILD_DIRECTORY
259
260 - builder:
261     name: opensteak-verify
262     builders:
263         - shell: |
264             #!/bin/bash
265
266             echo "Hello World!"
267
268 - builder:
269     name: opensteak-merge
270     builders:
271         - shell: |
272             #!/bin/bash
273
274             echo "Hello World!"
275
276 - builder:
277     name: opensteak-daily-master
278     builders:
279         - shell: |
280             #!/bin/bash
281
282             echo "Hello World!"