a6659b2bff8ab063df0e0b94b51c06b0f49b8316
[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: 'opnfv-build-centos'
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
58     scm:
59         - git-scm
60
61     wrappers:
62         - ssh-agent-wrapper
63         - timeout:
64             timeout: 360
65             fail: true
66
67     triggers:
68         - gerrit:
69             server-name: 'gerrit.opnfv.org'
70             trigger-on:
71                 - change-merged-event
72                 - comment-added-contains-event:
73                     comment-contains-value: 'remerge'
74             projects:
75                 - project-compare-type: 'ANT'
76                   project-pattern: '{project}'
77                   branches:
78                       - branch-compare-type: 'ANT'
79                         branch-pattern: '**/{branch}'
80                   file-paths:
81                       - compare-type: ANT
82                         pattern: 'ci/**'
83                       - compare-type: ANT
84                         pattern: 'code/**'
85                       - compare-type: ANT
86                         pattern: 'deploy/**'
87                   forbidden-file-paths:
88                       - compare-type: ANT
89                         pattern: 'docs/**'
90                       - compare-type: ANT
91                         pattern: '.gitignore'
92             readable-message: true
93
94     parameters:
95         - project-parameter:
96             project: '{project}'
97             branch: '{branch}'
98         - 'opnfv-build-centos-defaults'
99         - '{alias}-merge-defaults':
100             gs-pathname: '{gs-pathname}'
101
102     builders:
103         - description-setter:
104             description: "Built on $NODE_NAME"
105         - multijob:
106             name: build
107             condition: SUCCESSFUL
108             projects:
109                 - name: '{alias}-merge-build-{stream}'
110                   current-parameters: false
111                   predefined-parameters: |
112                     BRANCH=$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: '{alias}-merge-deploy-virtual-{stream}'
124                   current-parameters: false
125                   predefined-parameters: |
126                     BRANCH=$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
134 - job-template:
135     name: '{alias}-merge-{phase}-{stream}'
136
137     disabled: '{obj:disabled}'
138
139     concurrent: true
140
141     properties:
142         - logrotate-default
143         - throttle:
144             enabled: true
145             max-total: 4
146             option: 'project'
147         - build-blocker:
148             use-build-blocker: true
149             blocking-jobs:
150                 - '{alias}-merge-deploy-.*'
151             block-level: 'NODE'
152
153     scm:
154         - git-scm
155
156     wrappers:
157         - ssh-agent-wrapper
158         - timeout:
159             timeout: 360
160             fail: true
161
162     parameters:
163         - project-parameter:
164             project: '{project}'
165             branch: '{branch}'
166         - '{slave-label}-defaults'
167         - '{alias}-merge-defaults':
168             gs-pathname: '{gs-pathname}'
169
170     builders:
171         - description-setter:
172             description: "Built on $NODE_NAME"
173         - '{project}-merge-{phase}-macro'
174
175 #####################################
176 # builder macros
177 #####################################
178 - builder:
179     name: 'daisy-merge-build-macro'
180     builders:
181         - shell:
182             !include-raw: ./daisy4nfv-basic.sh
183         - shell:
184             !include-raw: ./daisy4nfv-build.sh
185         - shell:
186             !include-raw: ./daisy4nfv-upload-artifact.sh
187         - shell:
188             !include-raw: ./daisy4nfv-workspace-cleanup.sh
189
190 - builder:
191     name: 'daisy-merge-deploy-virtual-macro'
192     builders:
193         - shell:
194             !include-raw: ./daisy4nfv-download-artifact.sh
195         - shell:
196             !include-raw: ./daisy4nfv-virtual-deploy.sh
197         - shell:
198             !include-raw: ./daisy4nfv-workspace-cleanup.sh
199
200 #####################################
201 # parameter macros
202 #####################################
203 - parameter:
204     name: 'daisy4nfv-merge-defaults'
205     parameters:
206         - string:
207             name: BUILD_DIRECTORY
208             default: $WORKSPACE/build_output
209             description: "Directory where the build artifact will be located upon the completion of the build."
210         - string:
211             name: CACHE_DIRECTORY
212             default: $HOME/opnfv/cache/$INSTALLER_TYPE
213             description: "Directory where the cache to be used during the build is located."
214         - string:
215             name: GS_URL
216             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
217             description: "URL to Google Storage."