Disable blocking on buildable queue (Functest)
[releng.git] / jjb / cperf / cperf-ci-jobs.yaml
1 ---
2 ###################################
3 # job configuration for cperf
4 ###################################
5 - project:
6     name: cperf-ci-jobs
7     project: cperf
8
9     # -------------------------------
10     # BRANCH ANCHORS
11     # -------------------------------
12     stream: master
13     branch: '{stream}'
14     gs-pathname: ''
15     docker-tag: 'latest'
16
17     installer: apex
18
19     testsuite:
20       - csit
21       - cbench
22
23     jobs:
24       - 'cperf-{installer}-{testsuite}-{stream}'
25       - 'cperf-upload-logs-csit'
26
27 ################################
28 # job template
29 ################################
30 - job-template:
31     name: 'cperf-{installer}-{testsuite}-{stream}'
32
33     concurrent: true
34
35     properties:
36       - throttle:
37           enabled: true
38           max-per-node: 1
39           option: 'project'
40
41     wrappers:
42       - build-name:
43           name: '$BUILD_NUMBER Suite: $CPERF_SUITE_NAME ODL BRANCH: $ODL_BRANCH'
44       - timeout:
45           timeout: 400
46           abort: true
47
48     parameters:
49       - cperf-parameter:
50           testsuite: '{testsuite}'
51           gs-pathname: '{gs-pathname}'
52           docker-tag: '{docker-tag}'
53           stream: '{stream}'
54
55     builders:
56       - 'cperf-{testsuite}-builder'
57
58 - job-template:
59     name: 'cperf-upload-logs-csit'
60
61     concurrent: true
62
63     disabled: false
64
65     parameters:
66       - cperf-parameter:
67           testsuite: 'csit'
68           gs-pathname: '{gs-pathname}'
69           docker-tag: '{docker-tag}'
70           stream: '{stream}'
71
72     # yamllint enable rule:line-length
73     properties:
74       - logrotate-default
75       - throttle:
76           max-per-node: 1
77           max-total: 10
78           option: 'project'
79
80     builders:
81       - 'cperf-upload-logs-csit'
82
83 ########################
84 # parameter macros
85 ########################
86 - parameter:
87     name: cperf-parameter
88     parameters:
89       - string:
90           name: CPERF_SUITE_NAME
91           default: '{testsuite}'
92           description: "Suite name to run"
93       - string:
94           name: ODL_BRANCH
95           default: 'master'
96           description: "Branch that OpenDaylight is running"
97       - string:
98           name: OS_VERSION
99           default: 'master'
100           description: "OpenStack version (short name, no stable/ prefix)"
101       - string:
102           name: GS_PATHNAME
103           default: '{gs-pathname}'
104           description: "Version directory where the opnfv documents will be stored in gs repository"
105       - string:
106           name: CI_DEBUG
107           default: 'false'
108           description: "Show debug output information"
109       - string:
110           name: DOCKER_TAG
111           default: '{docker-tag}'
112           description: 'Tag to pull docker image'
113       - string:
114           name: RC_FILE_PATH
115           default: ''
116           description: "Path to the OS credentials file if given"
117       - string:
118           name: SSH_KEY_PATH
119           default: ''
120           description: "Path to the private SSH key to access OPNFV nodes"
121       - string:
122           name: NODE_FILE_PATH
123           default: ''
124           description: "Path to the yaml file describing overcloud nodes"
125       - string:
126           name: ODL_CONTAINERIZED
127           default: 'true'
128           description: "boolean set true if ODL on overcloud is a container"
129
130 ########################
131 # trigger macros
132 ########################
133
134 ########################
135 # builder macros
136 ########################
137 - builder:
138     name: cperf-csit-builder
139     builders:
140       - 'cperf-cleanup'
141       - 'cperf-prepare-robot'
142       - 'cperf-robot-netvirt-csit'
143
144 - builder:
145     name: cperf-cbench-builder
146     builders:
147       - 'cperf-cleanup'
148       - 'cperf-prepare-robot'
149       - 'cperf-robot-cbench'
150
151 - builder:
152     name: cperf-prepare-robot
153     builders:
154       - shell:
155           !include-raw: ./cperf-prepare-robot.sh
156
157 - builder:
158     name: cperf-robot-cbench
159     builders:
160       - shell: |
161           #!/bin/bash
162           set -o errexit
163           set -o nounset
164           set -o pipefail
165
166           # cbench requires the openflow drop test feature to be installed.
167           sshpass -p karaf ssh -o StrictHostKeyChecking=no \
168                                -o UserKnownHostsFile=/dev/null \
169                                -o LogLevel=error \
170                                -p 8101 karaf@$SDN_CONTROLLER_IP \
171                                 feature:install odl-openflowplugin-flow-services-ui odl-openflowplugin-drop-test
172
173           robot_cmd="pybot -e exclude -L TRACE -d /tmp \
174                       -v ODL_SYSTEM_1_IP:${SDN_CONTROLLER_IP} \
175                       -v ODL_SYSTEM_IP:${SDN_CONTROLLER_IP} \
176                       -v BUNDLEFOLDER:/opt/opendaylight \
177                       -v RESTCONFPORT:8081 \
178                       -v USER_HOME:/tmp \
179                       -v USER:heat-admin \
180                       -v ODL_SYSTEM_USER:heat-admin \
181                       -v TOOLS_SYSTEM_IP:localhost \
182                       -v of_port:6653"
183           robot_suite="/home/opnfv/repos/odl_test/csit/suites/openflowplugin/Performance/010_Cbench.robot"
184
185           docker run -i -v /tmp:/tmp opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite}
186
187 - builder:
188     name: cperf-robot-netvirt-csit
189     builders:
190       - shell:
191           !include-raw: ./cperf-robot-netvirt-csit.sh
192
193 - builder:
194     name: cperf-cleanup
195     builders:
196       - shell: |
197           #!/bin/bash
198           [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
199
200           echo "Cleaning up docker containers/images..."
201           # Remove previous running containers if exist
202           if [[ ! -z $(docker ps -a | grep opnfv/cperf) ]]; then
203               echo "Removing existing opnfv/cperf containers..."
204               docker ps -a | grep opnfv/cperf | awk '{print $1}' | xargs docker rm -f >${redirect}
205           fi
206
207 - builder:
208     name: cperf-upload-logs-csit
209     builders:
210       - shell: !include-raw: ./cperf-upload-logs-csit.sh