95e72e5500ee1b48347a38fd2cbd76c7497c9207
[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                   disable-strict-forbidden-file-verification: 'true'
88                   forbidden-file-paths:
89                       - compare-type: ANT
90                         pattern: 'docs/**'
91                       - compare-type: ANT
92                         pattern: '.gitignore'
93             readable-message: true
94
95     parameters:
96         - project-parameter:
97             project: '{project}'
98             branch: '{branch}'
99         - 'opnfv-build-centos-defaults'
100         - '{alias}-merge-defaults':
101             gs-pathname: '{gs-pathname}'
102
103     builders:
104         - description-setter:
105             description: "Built on $NODE_NAME"
106         - multijob:
107             name: build
108             condition: SUCCESSFUL
109             projects:
110                 - name: '{alias}-merge-build-{stream}'
111                   current-parameters: false
112                   predefined-parameters: |
113                     BRANCH=$BRANCH
114                     GERRIT_REFSPEC=$GERRIT_REFSPEC
115                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
116                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
117                   node-parameters: false
118                   kill-phase-on: FAILURE
119                   abort-all-job: true
120         - multijob:
121             name: deploy-virtual
122             condition: SUCCESSFUL
123             projects:
124                 - name: '{alias}-merge-deploy-virtual-{stream}'
125                   current-parameters: false
126                   predefined-parameters: |
127                     BRANCH=$BRANCH
128                     GERRIT_REFSPEC=$GERRIT_REFSPEC
129                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
130                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
131                   node-parameters: false
132                   kill-phase-on: FAILURE
133                   abort-all-job: true
134
135 - job-template:
136     name: '{alias}-merge-{phase}-{stream}'
137
138     disabled: '{obj:disabled}'
139
140     concurrent: true
141
142     properties:
143         - logrotate-default
144         - throttle:
145             enabled: true
146             max-total: 4
147             option: 'project'
148         - build-blocker:
149             use-build-blocker: true
150             blocking-jobs:
151                 - '{alias}-(merge|verify)-.*'
152                 - '{project}-daily-.*'
153             block-level: 'NODE'
154
155     scm:
156         - git-scm
157
158     wrappers:
159         - ssh-agent-wrapper
160         - timeout:
161             timeout: 360
162             fail: true
163
164     parameters:
165         - project-parameter:
166             project: '{project}'
167             branch: '{branch}'
168         - '{slave-label}-defaults'
169         - '{alias}-merge-defaults':
170             gs-pathname: '{gs-pathname}'
171
172     builders:
173         - description-setter:
174             description: "Built on $NODE_NAME"
175         - '{project}-merge-{phase}-macro'
176
177 #####################################
178 # builder macros
179 #####################################
180 - builder:
181     name: 'daisy-merge-build-macro'
182     builders:
183         - shell:
184             !include-raw: ./daisy4nfv-basic.sh
185         - shell:
186             !include-raw: ./daisy4nfv-build.sh
187         - shell:
188             !include-raw: ./daisy4nfv-upload-artifact.sh
189         - shell:
190             !include-raw: ./daisy4nfv-workspace-cleanup.sh
191
192 - builder:
193     name: 'daisy-merge-deploy-virtual-macro'
194     builders:
195         - shell:
196             !include-raw: ./daisy4nfv-download-artifact.sh
197         - shell:
198             !include-raw: ./daisy-deploy.sh
199         - shell:
200             !include-raw: ./daisy4nfv-workspace-cleanup.sh
201
202 #####################################
203 # parameter macros
204 #####################################
205 - parameter:
206     name: 'daisy4nfv-merge-defaults'
207     parameters:
208         - string:
209             name: BUILD_DIRECTORY
210             default: $WORKSPACE/build_output
211             description: "Directory where the build artifact will be located upon the completion of the build."
212         - string:
213             name: CACHE_DIRECTORY
214             default: $HOME/opnfv/cache/$INSTALLER_TYPE
215             description: "Directory where the cache to be used during the build is located."
216         - string:
217             name: GS_URL
218             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
219             description: "URL to Google Storage."