Merge "Switch XtestingCI gate to another runner"
[releng.git] / jjb / barometer / barometer.yaml
1 ---
2 ###################################################
3 # All the jobs except verify have been removed!
4 # They will only be enabled on request by projects!
5 ###################################################
6
7 - parameter:
8     name: 'opnfv-build-centos-defaults'
9     parameters:
10       - label:
11           name: SLAVE_LABEL
12           default: 'opnfv-build-centos'
13           all-nodes: false
14           node-eligibility: 'ignore-offline'
15       - string:
16           name: GIT_BASE
17           default: https://gerrit.opnfv.org/gerrit/$PROJECT
18           description: 'Git URL to use on this Jenkins Slave'
19       - string:
20           name: BUILD_DIRECTORY
21           default: $WORKSPACE/build_output
22           description: "Directory where the build artifact will be located upon the completion of the build."
23
24 - project:
25     name: barometer
26
27     project: '{name}'
28
29     jobs:
30       - 'barometer-verify-{stream}'
31       - 'barometer-merge-{stream}'
32       - 'barometer-daily-{stream}'
33       - 'barometer-plugins-tests'
34
35     stream:
36       - master:
37           branch: '{stream}'
38           gs-pathname: ''
39           disabled: false
40       - nile:
41           branch: 'stable/{stream}'
42           gs-pathname: '/{stream}'
43           disabled: false
44
45 - job-template:
46     name: 'barometer-verify-{stream}'
47
48     disabled: '{obj:disabled}'
49
50     parameters:
51       - project-parameter:
52           project: '{project}'
53           branch: '{branch}'
54       - 'opnfv-build-centos-defaults'
55
56     scm:
57       - git-scm-gerrit
58
59     triggers:
60       - gerrit:
61           server-name: 'gerrit.opnfv.org'
62           trigger-on:
63             - patchset-created-event:
64                 exclude-drafts: 'false'
65                 exclude-trivial-rebase: 'false'
66                 exclude-no-code-change: 'false'
67             - draft-published-event
68             - comment-added-contains-event:
69                 comment-contains-value: 'recheck'
70             - comment-added-contains-event:
71                 comment-contains-value: 'reverify'
72           projects:
73             - project-compare-type: 'ANT'
74               project-pattern: '{project}'
75               branches:
76                 - branch-compare-type: 'ANT'
77                   branch-pattern: '**/{branch}'
78               disable-strict-forbidden-file-verification: 'true'
79               forbidden-file-paths:
80                 - compare-type: ANT
81                   pattern: 'docs/**|.gitignore'
82
83     builders:
84       - shell: |
85           pwd
86           cd src
87           make clobber
88           make
89
90 - job-template:
91     name: 'barometer-merge-{stream}'
92
93     project-type: freestyle
94
95     disabled: '{obj:disabled}'
96
97     concurrent: true
98
99     properties:
100       - logrotate-default
101       - throttle:
102           enabled: true
103           max-total: 3
104           max-per-node: 2
105           option: 'project'
106
107     parameters:
108       - project-parameter:
109           project: '{project}'
110           branch: '{branch}'
111       - 'opnfv-build-centos-defaults'
112
113     scm:
114       - git-scm
115
116     triggers:
117       - gerrit:
118           server-name: 'gerrit.opnfv.org'
119           trigger-on:
120             - change-merged-event
121             - comment-added-contains-event:
122                 comment-contains-value: 'remerge'
123           projects:
124             - project-compare-type: 'ANT'
125               project-pattern: '{project}'
126               branches:
127                 - branch-compare-type: 'ANT'
128                   branch-pattern: '**/{branch}'
129               disable-strict-forbidden-file-verification: 'true'
130               forbidden-file-paths:
131                 - compare-type: ANT
132                   pattern: 'docs/**'
133
134     builders:
135       - shell: |
136           pwd
137           cd src
138           make clobber
139           make
140
141 - job-template:
142     name: 'barometer-daily-{stream}'
143
144     project-type: freestyle
145
146     disabled: '{obj:disabled}'
147
148     concurrent: false
149
150     properties:
151       - logrotate-default
152
153     parameters:
154       - project-parameter:
155           project: '{project}'
156           branch: '{branch}'
157       - barometer-project-parameter:
158           gs-pathname: '{gs-pathname}'
159       - 'opnfv-build-centos-defaults'
160
161     scm:
162       - git-scm
163
164     triggers:
165       - timed: '@midnight'
166
167     builders:
168       - shell: !include-raw-escape: ./barometer-build.sh
169       - shell: !include-raw-escape: ./barometer-upload-artifact.sh
170
171 - job-template:
172     name: 'barometer-plugins-tests'
173
174     branch: master
175
176     disabled: '{obj:disabled}'
177
178     parameters:
179       - string:
180           name: BRANCH
181           default: '{branch}'
182       - opnfv-build-centos-defaults
183
184     triggers:
185       - timed: '@midnight'
186
187     builders:
188       - shell: |
189          rm -rf barometer
190          git clone "https://gerrit.opnfv.org/gerrit/barometer"
191          cd barometer
192          sudo docker build -t opnfv/barometer-collectd-tests-base --network=host \
193             -f docker/barometer-collectd-plugin-tests/Dockerfile.base .
194          docker build -t opnfv/barometer-collectd-tests --network=host \
195             -f docker/barometer-collectd-plugin-tests/Dockerfile .
196          docker run -t --net=host
197             -v `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \
198             -v /var/run:/var/run -v /tmp:/tmp -v  `pwd`/plugin_test:/tests \
199             --privileged opnfv/barometer-collectd-tests:latest
200          docker container rm $(sudo docker container ls -aq)
201          docker rmi opnfv/barometer-collectd-tests:latest
202          docker rmi opnfv/barometer-collectd-tests-base:latest
203
204 ########################
205 # parameter macros
206 ########################
207 - parameter:
208     name: barometer-project-parameter
209     parameters:
210       - string:
211           name: GS_URL
212           default: '$GS_BASE{gs-pathname}'
213           description: "URL to Google Storage."