9e7b867af830dabed2246957d5f9b9f083f042f4
[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
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-(master|danube)'
152             block-level: 'NODE'
153
154     scm:
155         - git-scm
156
157     wrappers:
158         - ssh-agent-wrapper
159         - timeout:
160             timeout: 360
161             fail: true
162
163     parameters:
164         - project-parameter:
165             project: '{project}'
166             branch: '{branch}'
167         - '{slave-label}-defaults'
168         - '{alias}-merge-defaults':
169             gs-pathname: '{gs-pathname}'
170
171     builders:
172         - description-setter:
173             description: "Built on $NODE_NAME"
174         - '{project}-merge-{phase}-macro'
175
176 #####################################
177 # builder macros
178 #####################################
179 - builder:
180     name: 'daisy-merge-build-macro'
181     builders:
182         - shell:
183             !include-raw: ./daisy4nfv-basic.sh
184         - shell:
185             !include-raw: ./daisy4nfv-build.sh
186         - shell:
187             !include-raw: ./daisy4nfv-upload-artifact.sh
188         - shell:
189             !include-raw: ./daisy4nfv-workspace-cleanup.sh
190
191 - builder:
192     name: 'daisy-merge-deploy-virtual-macro'
193     builders:
194         - shell:
195             !include-raw: ./daisy4nfv-download-artifact.sh
196         - shell:
197             !include-raw: ./daisy-deploy.sh
198         - shell:
199             !include-raw: ./daisy4nfv-workspace-cleanup.sh
200
201 #####################################
202 # parameter macros
203 #####################################
204 - parameter:
205     name: 'daisy4nfv-merge-defaults'
206     parameters:
207         - string:
208             name: BUILD_DIRECTORY
209             default: $WORKSPACE/build_output
210             description: "Directory where the build artifact will be located upon the completion of the build."
211         - string:
212             name: CACHE_DIRECTORY
213             default: $HOME/opnfv/cache/$INSTALLER_TYPE
214             description: "Directory where the cache to be used during the build is located."
215         - string:
216             name: GS_URL
217             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
218             description: "URL to Google Storage."