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