blob: a851df1ace45fefe7e2f4d2cf245ff92b789893a (
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
|
- job:
name: tcwg-buildslave-command
project-type: matrix
defaults: global
properties:
- authorization:
linaro:
- job-read
- job-extended-read
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
parameters:
- string:
name: machines_list
default: 'dev-01.tcwglab'
description: 'Machines to run on: apm-01.tcwglab apm-02.tcwglab test-armv8-01.tcwglab test-armv8-02.tcwglab tcwg-tx1-01.tcwglab tcwg-tx1-02.tcwglab tcwg-tx1-03.tcwglab tcwg-tx1-04.tcwglab tcwg-tx1-05.tcwglab tcwg-tx1-06.tcwglab tcwg-tx1-07.tcwglab tcwg-tx1-08.tcwglab tcwg-tk1-01.tcwglab tcwg-tk1-02.tcwglab tcwg-tk1-03.tcwglab tcwg-tk1-04.tcwglab tcwg-tk1-05.tcwglab tcwg-tk1-06.tcwglab tcwg-tk1-07.tcwglab tcwg-tk1-08.tcwglab tcwg-tk1-09.tcwglab build-01.tcwglab build-02.tcwglab build-03.tcwglab build-04.tcwglab build-05.tcwglab build-06.tcwglab build-07.tcwglab build-08.tcwglab dev-01.tcwglab dev-02.tcwglab bkp-01.tcwglab'
- string:
name: command
default: 'ls $HOME/*'
description: 'Command to run'
- string:
name: target_user
default: 'tcwg-buildslave'
description: 'User to run as: tcwg-buildslave or tcwg-benchmark'
- bool:
name: dry_run
default: 'false'
description: 'Whether to do a dry-run'
disabled: false
node: tcwg-coordinator
concurrent: true
display-name: 'TCWG DDD Buildslave command'
axes:
- axis:
type: dynamic
name: machine
values:
- machines_list
description: 'SSH names of machines to run the command on'
- axis:
type: slave
name: label
values:
- tcwg-coordinator
wrappers:
- timeout:
timeout: 60
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
- 'tcwg-benchmark'
- build-name:
name: '#${BUILD_NUMBER}'
builders:
- shell: |
#!/bin/bash
set -ex
cat > command.sh.$$$$ << EOF
#!/bin/bash
set -ex
$command
EOF
chmod +x command.sh.$$$$
cat command.sh.$$$$
scp command.sh.$$$$ $target_user@$machine:/tmp/
# Don't use ssh shared connection to reliably proxy SSH agent
$dry_run || ssh -Snone $target_user@$machine /tmp/command.sh.$$$$
|