summaryrefslogtreecommitdiffstats
path: root/jjb/cperf/cperf-ci-jobs.yml
blob: 05f4d194680445bf37265bd4f73565eb85293921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
###################################
# job configuration for cperf
###################################
- project:
    name: cperf-ci-jobs
    project: cperf

#--------------------------------
# BRANCH ANCHORS
#--------------------------------
    master: &master
        stream: master
        branch: '{stream}'
        gs-pathname: ''
        docker-tag: 'latest'

#--------------------------------
# POD, INSTALLER, AND BRANCH MAPPING
#--------------------------------
    pod:
#--------------------------------
#        master
#--------------------------------
        - intel-pod2:
            installer: apex
            <<: *master

#--------------------------------

    testsuite:
        - 'daily'

    jobs:
        - 'cperf-{installer}-{pod}-{testsuite}-{stream}'

################################
# job template
################################
- job-template:
    name: 'cperf-{installer}-{pod}-{testsuite}-{stream}'

    concurrent: true

    properties:
        - throttle:
            enabled: true
            max-per-node: 1

    wrappers:
        - build-name:
            name: '$BUILD_NUMBER Suite: $CPERF_SUITE_NAME Scenario: $DEPLOY_SCENARIO'
        - timeout:
            timeout: 400
            abort: true

    parameters:
        - project-parameter:
            project: '{project}'
        - '{pod}-defaults'
        - '{installer}-defaults'
        - cperf-parameter:
            testsuite: '{testsuite}'
            gs-pathname: '{gs-pathname}'
            docker-tag: '{docker-tag}'

    scm:
        - git-scm:
            credentials-id: '{ssh-credentials}'
            refspec: ''
            branch: '{branch}'

    builders:
        - 'cperf-{testsuite}-builder'

########################
# parameter macros
########################
- parameter:
    name: cperf-parameter
    parameters:
        - string:
            name: CPERF_SUITE_NAME
            default: '{testsuite}'
            description: "Suite name to run"
        - string:
            name: GS_PATHNAME
            default: '{gs-pathname}'
            description: "Version directory where the opnfv documents will be stored in gs repository"
        - string:
            name: CI_DEBUG
            default: 'false'
            description: "Show debug output information"
        - string:
            name: DOCKER_TAG
            default: '{docker-tag}'
            description: 'Tag to pull docker image'

########################
# trigger macros
########################

########################
# builder macros
########################
- builder:
    name: cperf-daily-builder
    builders:
        - shell: |
            #!/bin/bash
            set +e
            # TODO: need to figure out the logic to get ${CONTROLLER_IP} used below
            docker pull opnfv/cperf:$DOCKER_TAG
            robot_cmd="pybot -e exclude -v ODL_SYSTEM_IP:${CONTROLLER_IP} -v switch_count:100 -v loops:10 \
                              -v TOOLS_SYSTEM_IP:localhost -v duration_in_seconds:60"
            robot_suite="/home/opnfv/repos/test/csit/suites/openflowplugin/Performance/010_Cbench.robot"
            sudo docker run -t -i opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite}