compass: Adjust jjb and scripts
[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                 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     concurrent: true
100
101     properties:
102         - throttle:
103             enabled: true
104             max-per-node: 1
105         - build-blocker:
106             use-build-blocker: true
107             blocking-jobs:
108                 - 'compass-deploy-huawei-virtual-daily-.*?'
109             block-level: 'NODE'
110
111     scm:
112         - gerrit-trigger-scm:
113             credentials-id: '{ssh-credentials}'
114             refspec: '$GERRIT_REFSPEC'
115             choosing-strategy: 'gerrit'
116
117     builders:
118         - shell:
119             !include-raw-escape: ./compass-build.sh
120         - shell:
121             !include-raw-escape: ./compass-deploy.sh
122
123     publishers:
124         - archive:
125             artifacts: 'ansible.log'
126             allow-empty: 'true'
127             fingerprint: true
128
129 - job-template:
130     name: 'compass-build-iso-{stream}'
131
132     concurrent: true
133
134     properties:
135         - throttle:
136             enabled: true
137             max-total: 1
138             max-per-node: 1
139
140     parameters:
141         - project-parameter:
142             project: '{project}'
143         - compass-project-parameter:
144             installer: '{installer}'
145             gs-pathname: '{gs-pathname}'
146         - 'ericsson-build-defaults'
147         - '{installer}-defaults'
148
149     scm:
150         - git-scm:
151             credentials-id: '{ssh-credentials}'
152             refspec: ''
153             branch: '{branch}'
154
155     triggers:
156         - timed: 'H 14 * * *'
157
158     builders:
159         - shell:
160             !include-raw-escape: ./compass-build.sh
161         - shell:
162             !include-raw-escape: ./compass-upload-artifact.sh
163         - shell:
164             !include-raw-escape: ./compass-workspace-cleanup.sh
165
166 - job-template:
167     name: 'compass-build-ppa-{stream}'
168
169     description: "build ppa(using docker) in huawei lab"
170
171     node: huawei-build
172
173     concurrent: true
174
175     properties:
176         - throttle:
177             enabled: true
178             max-total: 1
179             max-per-node: 1
180
181     parameters:
182         - project-parameter:
183             project: '{project}'
184         - compass-project-parameter:
185             installer: '{installer}'
186             gs-pathname: '{gs-pathname}'
187         - '{node}-defaults'
188         - '{installer}-defaults'
189     scm:
190         - git-scm:
191             credentials-id: '{ssh-credentials}'
192             refspec: ''
193             branch: '{branch}'
194
195     builders:
196         - shell:
197             !include-raw-escape: ./compass-makeppa.sh
198
199
200
201 ########################
202 # parameter macros
203 ########################
204 - parameter:
205     name: compass-project-parameter
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/$PROJECT{gs-pathname}"
214             description: "Directory where the cache to be used during the build is located."
215         - string:
216             name: GS_URL
217             default: '$GS_BASE{gs-pathname}'
218             description: "URL to Google Storage."
219         - string:
220             name: PPA_REPO
221             default: "http://205.177.226.237:9999{gs-pathname}"
222         - string:
223             name: PPA_CACHE
224             default: "$WORKSPACE/work/repo/"
225         - choice:
226             name: COMPASS_OPENSTACK_VERSION
227             choices:
228                 - 'liberty'
229                 - 'juno'
230         - choice:
231             name: COMPASS_OS_VERSION
232             choices:
233                 - 'trusty'
234                 - 'centos7'
235