Merge "[compass] adjust concurrency of ci daily jobs"
[releng.git] / jjb / compass4nfv / compass-project-jobs.yml
1 - project:
2
3     name: compass-project
4
5     installer: 'compass'
6
7     project: 'compass4nfv'
8
9     stream:
10         - master:
11             slave_name: 'huawei-us-deploy-vm-1'
12             branch: '{stream}'
13             gs-pathname: ''
14         - brahmaputra:
15             slave_name: 'huawei-us-deploy-vm-2'
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18
19
20     jobs:
21         - 'compass-verify-{stream}'
22         - 'compass-build-iso-{stream}'
23         - 'compass-build-ppa-{stream}'
24         - 'compass-verify-deploy-{stream}'
25
26
27 ########################
28 # job templates
29 ########################
30 - job-template:
31     name: 'compass-verify-{stream}'
32
33     disabled: false
34
35     node: '{slave_name}'
36
37     concurrent: false
38
39     wrappers:
40         - timeout:
41             timeout: 120
42             fail: true
43
44     properties:
45         - throttle:
46             enabled: true
47             max-per-node: 1
48         - build-blocker:
49             use-build-blocker: true
50             blocking-jobs:
51                 - 'compass-verify-[^-]*'
52                 - 'compass-os-.*?-virtual-daily-.*?'
53             block-level: 'NODE'
54
55     parameters:
56         - project-parameter:
57             project: '{project}'
58         - gerrit-parameter:
59             branch: '{branch}'
60         - compass-project-parameter:
61             installer: '{installer}'
62             gs-pathname: '{gs-pathname}'
63         #- '{node}-defaults'
64         - '{installer}-defaults'
65         - string:
66             name: DEPLOY_SCENARIO
67             default: 'os-nosdn-nofeature-ha'
68         - string:
69             name: GIT_BASE
70             default: https://gerrit.opnfv.org/gerrit/$PROJECT
71             description: 'Git URL to use on this Jenkins Slave'
72
73     triggers:
74         - gerrit:
75             trigger-on:
76                 - patchset-created-event:
77                     exclude-drafts: 'false'
78                     exclude-trivial-rebase: 'false'
79                     exclude-no-code-change: 'false'
80                 - draft-published-event
81                 - comment-added-contains-event:
82                     comment-contains-value: 'recheck'
83                 - comment-added-contains-event:
84                     comment-contains-value: 'reverify'
85             projects:
86               - project-compare-type: 'ANT'
87                 project-pattern: '{project}'
88                 branches:
89                   - branch-compare-type: 'ANT'
90                     branch-pattern: '**/{branch}'
91                 forbidden-file-paths:
92                   - compare-type: ANT
93                     pattern: 'docs/**|.gitignore'
94
95     builders:
96         - trigger-builds:
97             - project: 'compass-verify-deploy-{stream}'
98               current-parameters: true
99               same-node: true
100               block: true
101
102 - job-template:
103     name: 'compass-verify-deploy-{stream}'
104
105     concurrent: true
106
107     properties:
108         - throttle:
109             enabled: true
110             max-per-node: 1
111         - build-blocker:
112             use-build-blocker: true
113             blocking-jobs:
114                 - 'compass-deploy-huawei-virtual-daily-.*?'
115             block-level: 'NODE'
116
117     scm:
118         - gerrit-trigger-scm:
119             credentials-id: '{ssh-credentials}'
120             refspec: '$GERRIT_REFSPEC'
121             choosing-strategy: 'gerrit'
122
123     builders:
124         - shell:
125             !include-raw: ./compass-build.sh
126         - shell:
127             !include-raw: ./compass-deploy.sh
128
129     publishers:
130         - archive:
131             artifacts: 'ansible.log'
132             allow-empty: 'true'
133             fingerprint: true
134
135 - job-template:
136     name: 'compass-build-iso-{stream}'
137
138     node: ericsson-build
139
140     concurrent: true
141
142     properties:
143         - throttle:
144             enabled: true
145             max-total: 1
146             max-per-node: 1
147
148     parameters:
149         - project-parameter:
150             project: '{project}'
151         - compass-project-parameter:
152             installer: '{installer}'
153             gs-pathname: '{gs-pathname}'
154         - '{node}-defaults'
155         - '{installer}-defaults'
156
157     scm:
158         - git-scm:
159             credentials-id: '{ssh-credentials}'
160             refspec: ''
161             branch: '{branch}'
162
163     triggers:
164         - timed: 'H 14 * * *'
165
166     builders:
167         - shell:
168             !include-raw: ./compass-build.sh
169         - shell:
170             !include-raw: ./compass-upload-artifact.sh
171         - shell:
172             !include-raw: ./compass-workspace-cleanup.sh
173
174 - job-template:
175     name: 'compass-build-ppa-{stream}'
176
177     description: "build ppa(using docker) in huawei lab"
178
179     node: huawei-build
180
181     concurrent: true
182
183     properties:
184         - throttle:
185             enabled: true
186             max-total: 1
187             max-per-node: 1
188
189     parameters:
190         - project-parameter:
191             project: '{project}'
192         - compass-project-parameter:
193             installer: '{installer}'
194             gs-pathname: '{gs-pathname}'
195         - '{node}-defaults'
196         - '{installer}-defaults'
197     scm:
198         - git-scm:
199             credentials-id: '{ssh-credentials}'
200             refspec: ''
201             branch: '{branch}'
202
203     builders:
204         - shell:
205             !include-raw: ./compass-makeppa.sh
206
207
208
209 ########################
210 # parameter macros
211 ########################
212 - parameter:
213     name: compass-project-parameter
214     parameters:
215         - string:
216             name: BUILD_DIRECTORY
217             default: $WORKSPACE/build_output
218             description: "Directory where the build artifact will be located upon the completion of the build."
219         - string:
220             name: CACHE_DIRECTORY
221             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
222             description: "Directory where the cache to be used during the build is located."
223         - string:
224             name: GS_URL
225             default: '$GS_BASE{gs-pathname}'
226             description: "URL to Google Storage."
227         - string:
228             name: PPA_REPO
229             default: "http://205.177.226.237:9999{gs-pathname}"
230         - string:
231             name: PPA_CACHE
232             default: "$WORKSPACE/work/repo/"
233         - choice:
234             name: COMPASS_OPENSTACK_VERSION
235             choices:
236                 - 'liberty'
237                 - 'juno'
238         - choice:
239             name: COMPASS_OS_VERSION
240             choices:
241                 - 'trusty'
242                 - 'centos7'
243