This should make merge and verify jobs work
[releng.git] / jjb / genesis / genesis.yml
1 - project:
2     name: genesis
3     jobs:
4         - 'genesis-test'
5         - 'genesis-daily-master'
6         - 'genesis-merge'
7         - 'genesis-verify'
8
9     # stream:    branch with - in place of / (eg. stable-helium)
10     # branch:    branch (eg. stable/helium)
11     stream:
12         - master:
13             branch: 'master'
14
15     project: 'genesis'
16     somevar: 'foo'
17
18 - job-template:
19     name: genesis-test
20
21     project-type: freestyle
22
23     logrotate:
24         daysToKeep: 30
25         numToKeep: 10
26         artifactDaysToKeep: -1
27         artifactNumToKeep: -1
28
29     builders:
30         - shell: |
31             echo "Hello world from genesis"
32
33 - job-template:
34     name: 'genesis-daily-master'
35
36     # Job template for daily builders
37     #
38     # Required Variables:
39     #     stream:    branch with - in place of / (eg. stable)
40     #     branch:    branch (eg. stable)
41
42     project-type: freestyle
43     varsetabove: '{somevar}'
44
45     logrotate:
46         daysToKeep: '{build-days-to-keep}'
47         numToKeep: '{build-num-to-keep}'
48         artifactDaysToKeep: '{build-artifact-days-to-keep}'
49         artifactNumToKeep: '{build-artifact-num-to-keep}'
50
51     wrappers:
52         - ssh-agent-credentials:
53             user: '{ssh-credentials}'
54
55     triggers:
56         - timed: 'H H * * *'
57
58     prebuilders:
59         - test-macro
60
61     builders:
62         - shell: |
63             echo "Hello world from genesis {somevar} daily"
64         - test-macro
65
66     postbuilders:
67         - test-macro
68
69 - job-template:
70     name: 'genesis-verify'
71
72     project-type: freestyle
73     node: fuel
74
75     logrotate:
76         daysToKeep: 30
77         numToKeep: 10
78         artifactDaysToKeep: -1
79         artifactNumToKeep: -1
80
81     parameters:
82         - project-parameter:
83             project: '{project}'
84         - gerrit-parameter:
85             branch: 'master'
86     scm:
87         - gerrit-trigger-scm:
88             credentials-id: '{ssh-credentials}'
89             refspec: '$GERRIT_REFSPEC'
90             choosing-strategy: 'gerrit'
91
92     wrappers:
93         - ssh-agent-credentials:
94             user: '{ssh-credentials}'
95
96     triggers:
97         - gerrit:
98             trigger-on:
99                 - patchset-created-event:
100                     exclude-drafts: 'false'
101                     exclude-trivial-rebase: 'false'
102                     exclude-no-code-change: 'false'
103                 - draft-published-event
104                 - comment-added-contains-event:
105                     comment-contains-value: 'recheck'
106             projects:
107               - project-compare-type: 'ANT'
108                 project-pattern: 'genesis'
109                 branches:
110                   - branch-compare-type: 'ANT'
111                     branch-pattern: '**/master'
112                 file-paths:
113                     - compare-type: ANT
114                       pattern: jjb/**
115                     - compare-type: ANT
116                       pattern: jjb-templates/**
117
118     builders:
119         - shell: |
120             hostname
121             whoami
122             docker --version
123             cd fuel-build/docker
124             pwd
125             echo foo
126             make clean || true
127             make
128             cd ..
129             echo foo
130             make clean || true
131             sed -i -Ee 's,\ \-t,,g' docker/runcontext
132             make all
133   
134 - job-template:
135     name: 'genesis-merge'
136
137     # builder-merge job to run JJB update
138     #
139     # This job's purpose is to update all the JJB
140
141     project-type: freestyle
142     node: fuel
143
144     logrotate:
145         daysToKeep: 30
146         numToKeep: 40
147         artifactDaysToKeep: -1
148         artifactNumToKeep: 5
149
150     parameters:
151         - project-parameter:
152             project: '{project}'
153         - gerrit-parameter:
154             branch: 'master'
155
156     scm:
157         - gerrit-trigger-scm:
158             credentials-id: '{ssh-credentials}'
159             refspec: ''
160             choosing-strategy: 'default'
161
162     wrappers:
163         - ssh-agent-credentials:
164             user: '{ssh-credentials}'
165
166     triggers:
167         - gerrit:
168             trigger-on:
169                 - change-merged-event
170                 - comment-added-contains-event:
171                     comment-contains-value: 'remerge'
172             projects:
173               - project-compare-type: 'ANT'
174                 project-pattern: 'genesis'
175                 branches:
176                     - branch-compare-type: 'ANT'
177                       branch-pattern: '**/master'
178                 file-paths:
179                     - compare-type: ANT
180                       pattern: jjb/**
181
182     builders:
183         - shell: |
184             hostname
185             whoami
186             docker --version
187             cd fuel-build/docker
188             pwd
189             echo foo
190             make clean || true
191             make
192             cd ..
193             echo foo
194             make clean || true
195             sed -i -Ee 's,\ \-t,,g' docker/runcontext
196             make all