aa18dce056ee85e29d4becc8476bfe666f83ba2d
[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     concurrent: true
36
37     wrappers:
38         - timeout:
39             timeout: 120
40             fail: true
41
42     properties:
43         - throttle:
44             enabled: true
45             max-per-node: 1
46         - build-blocker:
47             use-build-blocker: true
48             blocking-jobs:
49                 - 'compass-verify-[^-]*'
50                 - 'compass-os-.*?-virtual-daily-.*?'
51             block-level: 'NODE'
52
53     parameters:
54         - project-parameter:
55             project: '{project}'
56         - gerrit-parameter:
57             branch: '{branch}'
58         - compass-project-parameter:
59             installer: '{installer}'
60             gs-pathname: '{gs-pathname}'
61         - 'huawei-virtual-defaults'
62         - '{installer}-defaults'
63         - string:
64             name: DEPLOY_SCENARIO
65             default: 'os-nosdn-nofeature-ha'
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                 file-paths:
86                   - compare-type: ANT
87                     pattern: '**'
88                 forbidden-file-paths:
89                   - compare-type: ANT
90                     pattern: 'docs/**|.gitignore'
91
92     builders:
93         - trigger-builds:
94             - project: 'compass-verify-deploy-{stream}'
95               current-parameters: true
96               same-node: true
97               block: true
98
99 - job-template:
100     name: 'compass-verify-deploy-{stream}'
101
102     concurrent: true
103
104     properties:
105         - throttle:
106             enabled: true
107             max-per-node: 1
108         - build-blocker:
109             use-build-blocker: true
110             blocking-jobs:
111                 - 'compass-deploy-huawei-virtual-daily-.*?'
112             block-level: 'NODE'
113
114     scm:
115         - gerrit-trigger-scm:
116             credentials-id: '{ssh-credentials}'
117             refspec: '$GERRIT_REFSPEC'
118             choosing-strategy: 'gerrit'
119
120     builders:
121         - shell:
122             !include-raw-escape: ./compass-build.sh
123         - shell:
124             !include-raw-escape: ./compass-deploy.sh
125
126     publishers:
127         - archive:
128             artifacts: 'ansible.log'
129             allow-empty: 'true'
130             fingerprint: true
131
132 - job-template:
133     name: 'compass-build-iso-{stream}'
134
135     concurrent: true
136
137     properties:
138         - throttle:
139             enabled: true
140             max-total: 1
141             max-per-node: 1
142
143     parameters:
144         - project-parameter:
145             project: '{project}'
146         - compass-project-parameter:
147             installer: '{installer}'
148             gs-pathname: '{gs-pathname}'
149         - 'ericsson-build-defaults'
150         - '{installer}-defaults'
151
152     scm:
153         - git-scm:
154             credentials-id: '{ssh-credentials}'
155             refspec: ''
156             branch: '{branch}'
157
158     triggers:
159         - timed: 'H 14 * * *'
160
161     builders:
162         - shell:
163             !include-raw-escape: ./compass-build.sh
164         - shell:
165             !include-raw-escape: ./compass-upload-artifact.sh
166         - shell:
167             !include-raw-escape: ./compass-workspace-cleanup.sh
168
169 - job-template:
170     name: 'compass-build-ppa-{stream}'
171
172     description: "build ppa(using docker) in huawei lab"
173
174     node: huawei-build
175
176     concurrent: true
177
178     properties:
179         - throttle:
180             enabled: true
181             max-total: 1
182             max-per-node: 1
183
184     parameters:
185         - project-parameter:
186             project: '{project}'
187         - compass-project-parameter:
188             installer: '{installer}'
189             gs-pathname: '{gs-pathname}'
190         - '{node}-defaults'
191         - '{installer}-defaults'
192     scm:
193         - git-scm:
194             credentials-id: '{ssh-credentials}'
195             refspec: ''
196             branch: '{branch}'
197
198     builders:
199         - shell:
200             !include-raw-escape: ./compass-makeppa.sh
201
202
203
204 ########################
205 # parameter macros
206 ########################
207 - parameter:
208     name: compass-project-parameter
209     parameters:
210         - string:
211             name: BUILD_DIRECTORY
212             default: $WORKSPACE/build_output
213             description: "Directory where the build artifact will be located upon the completion of the build."
214         - string:
215             name: CACHE_DIRECTORY
216             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
217             description: "Directory where the cache to be used during the build is located."
218         - string:
219             name: GS_URL
220             default: '$GS_BASE{gs-pathname}'
221             description: "URL to Google Storage."
222         - string:
223             name: PPA_REPO
224             default: "http://205.177.226.237:9999{gs-pathname}"
225         - string:
226             name: PPA_CACHE
227             default: "$WORKSPACE/work/repo/"
228         - choice:
229             name: COMPASS_OPENSTACK_VERSION
230             choices:
231                 - 'liberty'
232                 - 'juno'
233         - choice:
234             name: COMPASS_OS_VERSION
235             choices:
236                 - 'trusty'
237                 - 'centos7'
238