clean scm defenitions
[releng.git] / jjb / daisy4nfv / daisy4nfv-merge-jobs.yml
1 - project:
2     name: 'daisy4nfv-merge-jobs'
3
4     project: 'daisy'
5 #####################################
6 # branch definitions
7 #####################################
8     stream:
9         - master:
10             branch: '{stream}'
11             gs-pathname: ''
12             disabled: false
13 #####################################
14 # patch merge phases
15 #####################################
16     phase:
17         - 'basic':
18             slave-label: 'opnfv-build-centos'
19         - 'build':
20             slave-label: 'opnfv-build-centos'
21         - 'deploy-virtual':
22             slave-label: 'opnfv-build-centos'
23         - 'smoke-test':
24             slave-label: 'opnfv-build-centos'
25         - 'promote':
26             slave-label: 'opnfv-build-centos'
27 #####################################
28 # jobs
29 #####################################
30     jobs:
31         - 'daisy4nfv-merge-{stream}'
32         - 'daisy4nfv-merge-{phase}-{stream}'
33 #####################################
34 # job templates
35 #####################################
36 - job-template:
37     name: 'daisy4nfv-merge-{stream}'
38
39     project-type: multijob
40
41     disabled: false
42
43     concurrent: true
44
45     properties:
46         - throttle:
47             enabled: true
48             max-total: 4
49             option: 'project'
50
51     scm:
52         - git-scm-gerrit
53
54     wrappers:
55         - ssh-agent-wrapper
56         - timeout:
57             timeout: 360
58             fail: true
59
60     triggers:
61         - gerrit:
62             server-name: 'gerrit.opnfv.org'
63             trigger-on:
64                 - change-merged-event
65                 - comment-added-contains-event:
66                     comment-contains-value: 'remerge'
67             projects:
68               - project-compare-type: 'ANT'
69                 project-pattern: '{project}'
70                 branches:
71                   - branch-compare-type: 'ANT'
72                     branch-pattern: '**/{branch}'
73                 forbidden-file-paths:
74                   - compare-type: ANT
75                     pattern: 'docs/**|.gitignore'
76             readable-message: true
77
78     parameters:
79         - project-parameter:
80             project: '{project}'
81         - gerrit-parameter:
82             branch: '{branch}'
83         - 'opnfv-build-defaults'
84         - 'daisy4nfv-merge-defaults':
85             gs-pathname: '{gs-pathname}'
86
87     builders:
88         - description-setter:
89             description: "Built on $NODE_NAME"
90         - multijob:
91             name: basic
92             condition: SUCCESSFUL
93             projects:
94                 - name: 'daisy4nfv-merge-basic-{stream}'
95                   current-parameters: false
96                   predefined-parameters: |
97                     GERRIT_BRANCH=$GERRIT_BRANCH
98                     GERRIT_REFSPEC=$GERRIT_REFSPEC
99                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
100                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
101                   node-parameters: false
102                   kill-phase-on: FAILURE
103                   abort-all-job: true
104         - multijob:
105             name: build
106             condition: SUCCESSFUL
107             projects:
108                 - name: 'daisy4nfv-merge-build-{stream}'
109                   current-parameters: false
110                   predefined-parameters: |
111                     GERRIT_BRANCH=$GERRIT_BRANCH
112                     GERRIT_REFSPEC=$GERRIT_REFSPEC
113                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
114                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
115                   node-parameters: false
116                   kill-phase-on: FAILURE
117                   abort-all-job: true
118         - multijob:
119             name: deploy-virtual
120             condition: SUCCESSFUL
121             projects:
122                 - name: 'daisy4nfv-merge-deploy-virtual-{stream}'
123                   current-parameters: false
124                   predefined-parameters: |
125                     GERRIT_BRANCH=$GERRIT_BRANCH
126                     GERRIT_REFSPEC=$GERRIT_REFSPEC
127                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
128                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
129                   node-parameters: false
130                   kill-phase-on: FAILURE
131                   abort-all-job: true
132         - multijob:
133             name: smoke-test
134             condition: SUCCESSFUL
135             projects:
136                 - name: 'daisy4nfv-merge-smoke-test-{stream}'
137                   current-parameters: false
138                   predefined-parameters: |
139                     GERRIT_BRANCH=$GERRIT_BRANCH
140                     GERRIT_REFSPEC=$GERRIT_REFSPEC
141                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
142                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
143                   node-parameters: false
144                   kill-phase-on: FAILURE
145                   abort-all-job: true
146         - multijob:
147             name: promote
148             condition: SUCCESSFUL
149             projects:
150                 - name: 'daisy4nfv-merge-promote-{stream}'
151                   current-parameters: false
152                   predefined-parameters: |
153                     GERRIT_BRANCH=$GERRIT_BRANCH
154                     GERRIT_REFSPEC=$GERRIT_REFSPEC
155                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
156                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
157                   node-parameters: false
158                   kill-phase-on: FAILURE
159                   abort-all-job: true
160
161 - job-template:
162     name: 'daisy4nfv-merge-{phase}-{stream}'
163
164     disabled: '{obj:disabled}'
165
166     concurrent: true
167
168     properties:
169         - throttle:
170             enabled: true
171             max-total: 6
172             option: 'project'
173         - build-blocker:
174             use-build-blocker: true
175             blocking-jobs:
176                 - 'daisy4nfv-merge-deploy-.*'
177                 - 'daisy4nfv-merge-test-.*'
178             block-level: 'NODE'
179
180     scm:
181         - git-scm-gerrit
182
183     wrappers:
184         - ssh-agent-wrapper
185         - timeout:
186             timeout: 360
187             fail: true
188
189     parameters:
190         - project-parameter:
191             project: '{project}'
192         - gerrit-parameter:
193             branch: '{branch}'
194         - '{slave-label}-defaults'
195         - 'daisy4nfv-merge-defaults':
196             gs-pathname: '{gs-pathname}'
197
198     builders:
199         - description-setter:
200             description: "Built on $NODE_NAME"
201         - '{project}-merge-{phase}-macro'
202 #####################################
203 # builder macros
204 #####################################
205 - builder:
206     name: 'daisy-merge-basic-macro'
207     builders:
208         - shell:
209             !include-raw: ./daisy4nfv-basic.sh
210
211 - builder:
212     name: 'daisy-merge-build-macro'
213     builders:
214         - shell:
215             !include-raw:
216                 - ./daisy4nfv-build.sh
217                 - ./daisy4nfv-upload-artifact.sh
218                 - ./daisy4nfv-workspace-cleanup.sh
219
220 - builder:
221     name: 'daisy-merge-deploy-virtual-macro'
222     builders:
223         - shell:
224             !include-raw:
225                 - ./daisy4nfv-download-artifact.sh
226                 - ./daisy4nfv-virtual-deploy.sh
227                 - ./daisy4nfv-workspace-cleanup.sh
228
229 - builder:
230     name: 'daisy-merge-smoke-test-macro'
231     builders:
232         - shell: |
233             #!/bin/bash
234
235             echo "Not activated!"
236
237 - builder:
238     name: 'daisy-merge-promote-macro'
239     builders:
240         - shell: |
241             #!/bin/bash
242
243             echo "Not activated!"
244 #####################################
245 # parameter macros
246 #####################################
247 - parameter:
248     name: 'daisy4nfv-merge-defaults'
249     parameters:
250         - string:
251             name: BUILD_DIRECTORY
252             default: $WORKSPACE/build_output
253             description: "Directory where the build artifact will be located upon the completion of the build."
254         - string:
255             name: CACHE_DIRECTORY
256             default: $HOME/opnfv/cache/$INSTALLER_TYPE
257             description: "Directory where the cache to be used during the build is located."
258         - string:
259             name: GS_URL
260             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
261             description: "URL to Google Storage."