Adding sudo for docker command (just for testing)
[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             echo foo
121             echo bar
122             hostname
123             ls -la
124             docker --version
125             sudo docker ps
126
127
128 - job-template:
129     name: 'genesis-merge'
130
131     # builder-merge job to run JJB update
132     #
133     # This job's purpose is to update all the JJB
134
135     project-type: freestyle
136     node: fuel
137
138     logrotate:
139         daysToKeep: 30
140         numToKeep: 40
141         artifactDaysToKeep: -1
142         artifactNumToKeep: 5
143
144     parameters:
145         - project-parameter:
146             project: '{project}'
147         - gerrit-parameter:
148             branch: 'master'
149
150     scm:
151         - gerrit-trigger-scm:
152             credentials-id: '{ssh-credentials}'
153             refspec: ''
154             choosing-strategy: 'default'
155
156     wrappers:
157         - ssh-agent-credentials:
158             user: '{ssh-credentials}'
159
160     triggers:
161         - gerrit:
162             trigger-on:
163                 - change-merged-event
164                 - comment-added-contains-event:
165                     comment-contains-value: 'remerge'
166             projects:
167               - project-compare-type: 'ANT'
168                 project-pattern: 'genesis'
169                 branches:
170                     - branch-compare-type: 'ANT'
171                       branch-pattern: '**/master'
172                 file-paths:
173                     - compare-type: ANT
174                       pattern: jjb/**
175
176     builders:
177         - shell: |
178             hostname
179             ls -la
180             docker --version
181             sudo docker ps
182