- job: name: tcwg-buildslave-command project-type: matrix 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: 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 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' - bool: name: dry_run default: 'false' description: 'Whether to do a dry-run' disabled: false node: tcwg-x86_64-dev-01 concurrent: true display-name: 'TCWG CCC 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-x86_64-dev-01 wrappers: - timeout: timeout: 60 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' - build-name: name: '#${BUILD_NUMBER}-${ENV,var="machines_list"}' 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.$$$$ $machine:/tmp/ # Don't use ssh shared connection to reliably proxy SSH agent $dry_run || ssh -Snone $machine /tmp/command.sh.$$$$