merge GIT_BRANCH and GERRIT_BRANCH into BRANCH
[releng.git] / jjb / joid / joid-verify-jobs.yml
1 - project:
2     name: 'joid-verify-jobs'
3
4     project: 'joid'
5
6     installer: 'joid'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             branch: '{stream}'
13             gs-pathname: ''
14             disabled: false
15         - danube:
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18             disabled: false
19 #####################################
20 # patch verification phases
21 #####################################
22     phase:
23         - 'basic':
24             slave-label: 'opnfv-build-ubuntu'
25         - 'deploy-virtual':
26             slave-label: 'joid-virtual'
27         - 'smoke-test':
28             slave-label: 'joid-virtual'
29 #####################################
30 # jobs
31 #####################################
32     jobs:
33         - 'joid-verify-{stream}'
34         - 'joid-verify-{phase}-{stream}'
35 #####################################
36 # job templates
37 #####################################
38 - job-template:
39     name: 'joid-verify-{stream}'
40
41     disabled: '{obj:disabled}'
42
43     project-type: multijob
44
45     concurrent: true
46
47     properties:
48         - logrotate-default
49         - throttle:
50             enabled: true
51             max-total: 4
52             max-per-node: 1
53             option: 'project'
54         - build-blocker:
55             use-build-blocker: true
56             blocking-jobs:
57                 - 'joid-verify-master'
58                 - 'joid-verify-danube'
59             block-level: 'NODE'
60
61     scm:
62         - git-scm-gerrit
63
64     wrappers:
65         - ssh-agent-wrapper
66         - timeout:
67             timeout: 360
68             fail: true
69
70     triggers:
71         - gerrit:
72             server-name: 'gerrit.opnfv.org'
73             trigger-on:
74                 - patchset-created-event:
75                     exclude-drafts: 'false'
76                     exclude-trivial-rebase: 'false'
77                     exclude-no-code-change: 'false'
78                 - draft-published-event
79                 - comment-added-contains-event:
80                     comment-contains-value: 'recheck'
81                 - comment-added-contains-event:
82                     comment-contains-value: 'reverify'
83             projects:
84               - project-compare-type: 'ANT'
85                 project-pattern: '{project}'
86                 branches:
87                   - branch-compare-type: 'ANT'
88                     branch-pattern: '**/{branch}'
89                 forbidden-file-paths:
90                   - compare-type: ANT
91                     pattern: 'docs/**|.gitignore'
92             readable-message: true
93
94     parameters:
95         - project-parameter:
96             project: '{project}'
97             branch: '{branch}'
98         - 'joid-virtual-defaults'
99
100     builders:
101         - description-setter:
102             description: "Built on $NODE_NAME"
103         - multijob:
104             name: basic
105             condition: SUCCESSFUL
106             projects:
107                 - name: 'joid-verify-basic-{stream}'
108                   current-parameters: false
109                   predefined-parameters: |
110                     BRANCH=$BRANCH
111                     GERRIT_REFSPEC=$GERRIT_REFSPEC
112                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
113                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
114                   kill-phase-on: FAILURE
115                   abort-all-job: true
116         - multijob:
117             name: deploy-virtual
118             condition: SUCCESSFUL
119             projects:
120                 - name: 'joid-verify-deploy-virtual-{stream}'
121                   current-parameters: false
122                   predefined-parameters: |
123                     BRANCH=$BRANCH
124                     GERRIT_REFSPEC=$GERRIT_REFSPEC
125                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
126                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
127                   node-parameters: true
128                   kill-phase-on: FAILURE
129                   abort-all-job: true
130         - multijob:
131             name: smoke-test
132             condition: SUCCESSFUL
133             projects:
134                 - name: 'joid-verify-smoke-test-{stream}'
135                   current-parameters: false
136                   predefined-parameters: |
137                     BRANCH=$BRANCH
138                     GERRIT_REFSPEC=$GERRIT_REFSPEC
139                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
140                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
141                   node-parameters: true
142                   kill-phase-on: FAILURE
143                   abort-all-job: true
144
145 - job-template:
146     name: 'joid-verify-{phase}-{stream}'
147
148     disabled: '{obj:disabled}'
149
150     concurrent: true
151
152     properties:
153         - logrotate-default
154         - throttle:
155             enabled: true
156             max-total: 4
157             max-per-node: 1
158             option: 'project'
159         - build-blocker:
160             use-build-blocker: true
161             blocking-jobs:
162                 - 'joid-verify-deploy-.*'
163                 - 'joid-verify-test-.*'
164             block-level: 'NODE'
165
166     scm:
167         - git-scm-gerrit
168
169     wrappers:
170         - ssh-agent-wrapper
171         - timeout:
172             timeout: 360
173             fail: true
174
175     parameters:
176         - project-parameter:
177             project: '{project}'
178             branch: '{branch}'
179         - '{installer}-defaults'
180         - '{slave-label}-defaults'
181
182     builders:
183         - description-setter:
184             description: "Built on $NODE_NAME"
185         - '{project}-verify-{phase}-macro'
186 #####################################
187 # builder macros
188 #####################################
189 - builder:
190     name: 'joid-verify-basic-macro'
191     builders:
192         - shell: |
193             #!/bin/bash
194
195             echo "Not activated!"
196
197 - builder:
198     name: 'joid-verify-deploy-virtual-macro'
199     builders:
200         - shell: |
201             #!/bin/bash
202
203             echo "Not activated!"
204
205 - builder:
206     name: 'joid-verify-smoke-test-macro'
207     builders:
208         - shell: |
209             #!/bin/bash
210
211             echo "Not activated!"