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