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