Merge "Create Jenkins Job for testapi automation"
[releng.git] / jjb / fuel / fuel-plugin-verify-jobs.yml
1 - project:
2     name: 'fuel-plugin-verify-jobs'
3
4     project: 'fuel-plugin'
5
6     installer: 'fuel'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             upstream-branch: '{stream}'
13             opnfv-branch: 'experimental'
14             gs-pathname: ''
15             disabled: false
16 #####################################
17 # patch verification phases
18 #####################################
19     phase:
20         - 'build':
21             slave-label: 'opnfv-build-ubuntu'
22         - 'test':
23             slave-label: 'opnfv-build-ubuntu'
24 #####################################
25 # jobs
26 #####################################
27     jobs:
28         - 'fuel-verify-plugin-{stream}'
29         - 'fuel-verify-plugin-{phase}-{stream}'
30 #####################################
31 # job templates
32 #####################################
33 - job-template:
34     name: 'fuel-verify-plugin-{stream}'
35
36     project-type: multijob
37
38     disabled: '{obj:disabled}'
39
40     concurrent: true
41
42     properties:
43         - throttle:
44             enabled: true
45             max-total: 4
46             option: 'project'
47
48     parameters:
49         - project-parameter:
50             project: '{project}'
51         - gerrit-parameter:
52             branch: '{upstream-branch}'
53             description: 'OpenStack branch to use'
54         - string:
55             name: OPNFV_BRANCH
56             default: '{opnfv-branch}'
57             description: 'OPNFV branch to use'
58         - 'opnfv-build-defaults'
59         - 'fuel-verify-plugin-defaults':
60             gs-pathname: '{gs-pathname}'
61
62     scm:
63         - git:
64             url: 'https://git.openstack.org/$GERRIT_PROJECT'
65             refspec: '$GERRIT_REFSPEC'
66             branches:
67                 - 'origin/$GERRIT_BRANCH'
68             skip-tag: true
69             choosing-strategy: 'gerrit'
70             timeout: 10
71             wipe-workspace: true
72
73     wrappers:
74         - ssh-agent-wrapper
75         - timeout:
76             timeout: 360
77             fail: true
78
79     triggers:
80         - gerrit:
81             server-name: 'review.openstack.org'
82             silent-start: false
83             skip-vote:
84                 successful: true
85                 failed: true
86                 unstable: true
87                 notbuilt: true
88             escape-quotes: true
89             trigger-on:
90                 - patchset-created-event:
91                     exclude-drafts: 'false'
92                     exclude-trivial-rebase: 'false'
93                     exclude-no-code-change: 'false'
94                 - comment-added-contains-event:
95                     comment-contains-value: 'recheck'
96                 - comment-added-contains-event:
97                     comment-contains-value: 'reverify'
98             projects:
99               - project-compare-type: 'PLAIN'
100                 project-pattern: 'openstack/fuel-plugin-bgpvpn'
101                 branches:
102                   - branch-compare-type: 'ANT'
103                     branch-pattern: '**/{upstream-branch}'
104                 forbidden-file-paths:
105                   - compare-type: ANT
106                     pattern: 'README.md|.gitignore|.gitreview'
107               - project-compare-type: 'PLAIN'
108                 project-pattern: 'openstack/fuel-plugin-onos'
109                 branches:
110                   - branch-compare-type: 'ANT'
111                     branch-pattern: '**/{upstream-branch}'
112                 forbidden-file-paths:
113                   - compare-type: ANT
114                     pattern: 'README.md|.gitignore|.gitreview'
115             readable-message: true
116
117     builders:
118         - description-setter:
119             description: "Built on $NODE_NAME"
120         - multijob:
121             name: build
122             condition: SUCCESSFUL
123             projects:
124                 - name: 'fuel-verify-plugin-build-{stream}'
125                   current-parameters: false
126                   predefined-parameters: |
127                     GERRIT_PROJECT=$GERRIT_PROJECT
128                     GERRIT_BRANCH=$GERRIT_BRANCH
129                     GERRIT_REFSPEC=$GERRIT_REFSPEC
130                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
131                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
132                   node-parameters: false
133                   kill-phase-on: FAILURE
134                   abort-all-job: true
135         - multijob:
136             name: test
137             condition: SUCCESSFUL
138             projects:
139                 - name: 'fuel-verify-plugin-test-{stream}'
140                   current-parameters: false
141                   predefined-parameters: |
142                     GERRIT_PROJECT=$GERRIT_PROJECT
143                     GERRIT_BRANCH=$GERRIT_BRANCH
144                     GERRIT_REFSPEC=$GERRIT_REFSPEC
145                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
146                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
147                   node-parameters: false
148                   kill-phase-on: FAILURE
149                   abort-all-job: true
150
151 - job-template:
152     name: 'fuel-verify-plugin-{phase}-{stream}'
153
154     disabled: '{obj:disabled}'
155
156     concurrent: true
157
158     properties:
159         - throttle:
160             enabled: true
161             max-total: 6
162             option: 'project'
163         - build-blocker:
164             use-build-blocker: true
165             blocking-jobs:
166                 - 'fuel-verify-plugin-test-.*'
167             block-level: 'NODE'
168
169     parameters:
170         - project-parameter:
171             project: '{project}'
172         - gerrit-parameter:
173             branch: '{upstream-branch}'
174             description: 'OpenStack branch to use'
175         - string:
176             name: OPNFV_BRANCH
177             default: '{opnfv-branch}'
178             description: 'OPNFV branch to use'
179         - '{slave-label}-defaults'
180         - '{installer}-defaults'
181         - 'fuel-verify-plugin-defaults':
182             gs-pathname: '{gs-pathname}'
183
184     scm:
185         - git:
186             url: 'https://git.openstack.org/$GERRIT_PROJECT'
187             refspec: '$GERRIT_REFSPEC'
188             branches:
189                 - 'origin/$GERRIT_BRANCH'
190             skip-tag: true
191             choosing-strategy: 'gerrit'
192             timeout: 10
193             wipe-workspace: true
194
195     wrappers:
196         - ssh-agent-wrapper
197         - timeout:
198             timeout: 360
199             fail: true
200
201     builders:
202         - description-setter:
203             description: "Built on $NODE_NAME"
204         - 'fuel-verify-plugin-{phase}-macro'
205 #####################################
206 # builder macros
207 #####################################
208 - builder:
209     name: 'fuel-verify-plugin-build-macro'
210     builders:
211         - shell:
212             !include-raw: ./fuel-plugin-build.sh
213
214 - builder:
215     name: 'fuel-verify-plugin-test-macro'
216     builders:
217         - shell:
218             !include-raw: ./fuel-plugin-test.sh
219 #####################################
220 # parameter macros
221 #####################################
222 - parameter:
223     name: 'fuel-verify-plugin-defaults'
224     parameters:
225         - string:
226             name: BUILD_DIRECTORY
227             default: $WORKSPACE/build_output
228             description: "Directory where the build artifact will be located upon the completion of the build."
229         - string:
230             name: CACHE_DIRECTORY
231             default: $HOME/opnfv/cache/$INSTALLER_TYPE
232             description: "Directory where the cache to be used during the build is located."
233         - string:
234             name: GS_URL
235             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
236             description: "URL to Google Storage."