Allow triggering nfvbench jobs by comments
[releng.git] / jjb / nfvbench / nfvbench.yaml
1 ---
2 - project:
3     name: nfvbench
4
5     project: '{name}'
6
7     jobs:
8       - 'nfvbench-build-{stream}'
9       - 'nfvbench-verify-{stream}'
10
11     stream:
12       - master:
13           branch: '{stream}'
14           gs-pathname: ''
15           docker-tag: 'latest'
16           disabled: false
17       - gambia:
18           branch: 'stable/{stream}'
19           gs-pathname: '/{stream}'
20           docker-tag: 'stable'
21           disabled: false
22
23 - job-template:
24     name: 'nfvbench-build-{stream}'
25
26     disabled: '{obj:disabled}'
27
28     parameters:
29       - project-parameter:
30           project: '{project}'
31           branch: '{branch}'
32       # yamllint disable rule:line-length
33       - string:
34           name: GIT_BASE
35           default: https://gerrit.opnfv.org/gerrit/$PROJECT
36           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
37       # yamllint enable rule:line-length
38       - 'opnfv-build-ubuntu-defaults'
39
40     scm:
41       - git-scm-gerrit
42
43     triggers:
44       - gerrit:
45           server-name: 'gerrit.opnfv.org'
46           trigger-on:
47             - change-merged-event
48             - comment-added-contains-event:
49                 comment-contains-value: 'remerge'
50           projects:
51             - project-compare-type: 'ANT'
52               project-pattern: '{project}'
53               branches:
54                 - branch-compare-type: 'ANT'
55                   branch-pattern: '**/{branch}'
56
57     builders:
58       - shell: |
59           cd $WORKSPACE/nfvbenchvm/dib
60           bash build-image.sh
61
62 - job-template:
63     name: 'nfvbench-verify-{stream}'
64
65     disabled: '{obj:disabled}'
66
67     parameters:
68       - project-parameter:
69           project: '{project}'
70           branch: '{branch}'
71       # yamllint disable rule:line-length
72       - string:
73           name: GIT_BASE
74           default: https://gerrit.opnfv.org/gerrit/$PROJECT
75           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
76       # yamllint enable rule:line-length
77       - 'opnfv-build-ubuntu-defaults'
78
79     scm:
80       - git-scm-gerrit
81
82     triggers:
83       - gerrit:
84           server-name: 'gerrit.opnfv.org'
85           trigger-on:
86             - patchset-created-event:
87                 exclude-drafts: 'false'
88                 exclude-trivial-rebase: 'false'
89                 exclude-no-code-change: 'false'
90             - comment-added-contains-event:
91                 comment-contains-value: 'recheck'
92             - comment-added-contains-event:
93                 comment-contains-value: 'reverify'
94           projects:
95             - project-compare-type: 'ANT'
96               project-pattern: '{project}'
97               branches:
98                 - branch-compare-type: 'ANT'
99                   branch-pattern: '**/{branch}'
100
101     builders:
102       - shell: |
103           sudo pip install tox-pip-version
104           cd $WORKSPACE && tox
105           cd $WORKSPACE/nfvbenchvm/dib
106           bash verify-image.sh -v