8f1ec9b5fcda6fb39e8d8d3de69591b8f5db0aea
[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 - parameter:
24     name: nfvbench-parameter
25     parameters:
26       - label:
27           name: node
28           default: 'opnfv-build'
29
30 - job-template:
31     name: 'nfvbench-build-{stream}'
32
33     disabled: '{obj:disabled}'
34
35     parameters:
36       - project-parameter:
37           project: '{project}'
38           branch: '{branch}'
39       # yamllint disable rule:line-length
40       - string:
41           name: GIT_BASE
42           default: https://gerrit.opnfv.org/gerrit/$PROJECT
43           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
44       # yamllint enable rule:line-length
45       - nfvbench-parameter
46
47     scm:
48       - git-scm-gerrit
49
50     triggers:
51       - gerrit:
52           server-name: 'gerrit.opnfv.org'
53           trigger-on:
54             - change-merged-event
55             - comment-added-contains-event:
56                 comment-contains-value: 'remerge'
57           projects:
58             - project-compare-type: 'ANT'
59               project-pattern: '{project}'
60               branches:
61                 - branch-compare-type: 'ANT'
62                   branch-pattern: '**/{branch}'
63
64     builders:
65       - shell: |
66           cd $WORKSPACE/nfvbenchvm/dib
67           bash build-image.sh
68
69 - job-template:
70     name: 'nfvbench-verify-{stream}'
71
72     disabled: '{obj:disabled}'
73
74     parameters:
75       - project-parameter:
76           project: '{project}'
77           branch: '{branch}'
78       # yamllint disable rule:line-length
79       - string:
80           name: GIT_BASE
81           default: https://gerrit.opnfv.org/gerrit/$PROJECT
82           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
83       # yamllint enable rule:line-length
84       - nfvbench-parameter
85
86     scm:
87       - git-scm-gerrit
88
89     triggers:
90       - gerrit:
91           server-name: 'gerrit.opnfv.org'
92           trigger-on:
93             - patchset-created-event:
94                 exclude-drafts: 'false'
95                 exclude-trivial-rebase: 'false'
96                 exclude-no-code-change: 'false'
97             - comment-added-contains-event:
98                 comment-contains-value: 'recheck'
99             - comment-added-contains-event:
100                 comment-contains-value: 'reverify'
101           projects:
102             - project-compare-type: 'ANT'
103               project-pattern: '{project}'
104               branches:
105                 - branch-compare-type: 'ANT'
106                   branch-pattern: '**/{branch}'
107
108     builders:
109       - shell: |
110           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
111           sudo DEBIAN_FRONTEND=noninteractive apt-get \
112             -o DPkg::Lock::Timeout=300 dist-upgrade -y
113           sudo DEBIAN_FRONTEND=noninteractive \
114           apt-get -o DPkg::Lock::Timeout=300 install software-properties-common gpg -y
115           sudo add-apt-repository -y ppa:deadsnakes/ppa
116           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
117           sudo DEBIAN_FRONTEND=noninteractive apt-get \
118             -o DPkg::Lock::Timeout=300 install \
119             libxml2-dev libxslt-dev libffi-dev libjpeg-dev \
120             python3.8 python3.8-dev python3.8-distutils \
121             python3-pip -y
122           sudo pip install tox-pip-version
123           cd $WORKSPACE && tox
124           curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
125           echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a \
126             /etc/apt/sources.list.d/google-cloud-sdk.list
127           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
128           sudo DEBIAN_FRONTEND=noninteractive apt-get \
129             -o DPkg::Lock::Timeout=300 install \
130             google-cloud-sdk python3-venv -y
131           cd $WORKSPACE/nfvbenchvm/dib
132           bash verify-image.sh -v