aboutsummaryrefslogtreecommitdiff
path: root/trigger-linux-lng-v4.1-rt-test-definitions-scheduled.yaml
blob: f60715c361fc1653cb46574de3e3eeb137c57f83 (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
- job:
    name: trigger-linux-lng-v4.1-rt-test-definitions-scheduled
    project-type: matrix
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
    disabled: false
    node: build
    display-name: 'Trigger for Linaro Networking Group Kernel v4.1-rt - Submit scheduled LAVA test definitions'
    triggers:
        - timed: '@daily'
    axes:
        - axis:
            type: user-defined
            name: hwpack
            values:
                - arndale
                - arndale-be
                - x86_64
        - axis:
            type: slave
            name: label
            values:
                - master
    execution-strategy:
        sequential: true
    wrappers:
        - timestamps
        - matrix-tie-parent:
            node: build
    builders:
        - shell: |
            #!/bin/bash

            set -ex

            PUB_DEST='http://snapshots.linaro.org/kernel-hwpack/linux-linaro-lng-v4.1-rt/'
            BUILD_NUMBER=$(wget -q --no-check-certificate -O - https://ci.linaro.org/job/linux-lng-v4.1-rt/hwpack=${hwpack},label=docker-utopic/lastSuccessfulBuild/buildNumber)

            case "$(date +%A)" in
              Tuesday|Thursday)
                test_plan=${PUB_DEST}/${hwpack}/${BUILD_NUMBER}/lava/template-benchmark.json
                [ "${hwpack}" = "arndale-be" ] && test_plan=${PUB_DEST}/${hwpack}/${BUILD_NUMBER}/lava/template-be-benchmark.json
                ;;
              Wednesday|Saturday)
                test_plan=${PUB_DEST}/${hwpack}/${BUILD_NUMBER}/lava/template-cyclic.json
                [ "${hwpack}" = "arndale-be" ] && test_plan=${PUB_DEST}/${hwpack}/${BUILD_NUMBER}/lava/template-be-cyclic.json
                ;;
              Monday|Friday|Sunday)
                test_plan=${PUB_DEST}/${hwpack}/${BUILD_NUMBER}/lava/template-base.json
                [ "${hwpack}" = "arndale-be" ] && test_plan=${PUB_DEST}/${hwpack}/${BUILD_NUMBER}/lava/template-be-base.json
                ;;
             esac

             cat << EOF > post_build_lava_parameters
             DEVICE_TYPE=lng-dummy
             BUNDLE_STREAM_NAME=/public/team/linaro/ci-linux-lng/
             CUSTOM_JSON_URL=${test_plan}
             LAVA_SERVER=lng.validation.linaro.org/RPC2/
             EOF
        - trigger-builds:
            - project: 'post-build-lava'
              property-file: post_build_lava_parameters
              block: true