aboutsummaryrefslogtreecommitdiff
path: root/tcwg-buildslave-command.yaml
blob: 3082b1129b92c08690ed234038e0d9d972d21f13 (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
- job:
    name: tcwg-buildslave-command
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 100
    parameters:
        - label:
            name: nodes
            default: tcwg-amp_64-build || tcwg-apm_64-build || tcwg-apm_64-test || tcwg-coordinator || tcwg-d05-01 || tcwg-sq_64-build || tcwg-tk1_32-build || tcwg-x86_64-build || tcwg-x86_64-cam
            all-nodes: true
            matching-label: 'allCases'
            node-eligibility: 'ignore-offline'
            description: 'Machines to run on'
        - text:
            name: command
            default: |
              #!/bin/bash
              set -ex

              ls -la $HOME/
            description: 'Command to run'
        - bool:
            name: dry_run
            default: 'false'
            description: 'Whether to do a dry-run'
        - string:
            name: displayname
            default: 'unknown'
            description: 'Name to display in the Jenkins console, so that the build name is more helpful'
    disabled: false
    concurrent: true
    display-name: 'TCWG CCC Buildslave Command'
    wrappers:
        - timeout:
            timeout: 60
        - timestamps
        - ssh-agent-credentials:
            # tcwg-buildslave user id
            users:
                - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
                - 'tcwg-benchmark'
        - build-name:
            name: '${displayname}-${BUILD_NUMBER}-${NODE_NAME}'
    builders:
        - shell: |
            #!/bin/bash

            set -ex

            cat > command-$BUILD_NUMBER.sh << EOF
            $command
            EOF
            chmod +x command-$BUILD_NUMBER.sh

            if $dry_run; then
              cat command-$BUILD_NUMBER.sh
            else
              ./command-$BUILD_NUMBER.sh
            fi
    publishers:
        - email-ext:
            recipients: 'tcwg-validation@linaro.org'
            aborted: true