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