aboutsummaryrefslogtreecommitdiff
path: root/lkft-notify-kselftest-next.yaml
blob: 05f4b6774d4d8e24c99ae3f3694aaad2826de108 (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
- job:
    name: lkft-notify-kselftest-next
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
    parameters:
        - string:
            name: BUILD_ID
            description: 'Next build API ID; i.e. 13138'
        - string:
            name: EMAIL_DESTINATION
            description: 'Email address to notify, instead of default behavior'
            default: "lkft-triage@lists.linaro.org,dan.rue@linaro.org,anders.roxell@linaro.org,naresh.kamboju@linaro.org,shuah@kernel.org,linux-kselftest@vger.kernel.org"
        - bool:
            name: DRY_RUN
            description: 'Do not notify; just run and echo the report to the console'
            default: False
    disabled: false
    node: master
    concurrent: false
    display-name: 'LKFT Notify kselftest on next'
    scm:
        - git:
            url: https://github.com/Linaro/lkft-tools.git
            refspec: +refs/heads/*:refs/remotes/origin/*
            name: origin
            branches:
                - refs/heads/master
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
            clean:
                before: true
    wrappers:
        - timeout:
            timeout: 60
        - timestamps
    builders:
        - shell: |
            #!/bin/bash

            set -ex

            python ./bin/generate_next_kselftest_report.py --build ${BUILD_ID}

            # Append default email addresses
            echo -n ${EMAIL_DESTINATION} > email.to

    publishers:
        - email-ext:
            # Send custom email generated in jenkins job
            recipients: ${FILE,path="email.to"}
            subject: ${FILE,path="email.subject"}
            content-type: text
            body: |
                ${FILE,path="email.body"}
            presend-script: "if (${DRY_RUN} == true){logger.println(\"DRY_RUN is set; skipping email notification\"); cancel = true}"
            success: true
            failure: false
        - email:
             recipients: 'dan.rue@linaro.org anders.roxell@linaro.org'