- 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.$$$$