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