- job: name: tcwg-cleanup-stale-containers 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 - throttle: max-per-node: 1 option: project parameters: - string: name: hours default: '10' description: 'Delete containers that are more then "hours" old. Use "0" to disable time check.' - string: name: docker_ps_opts default: '' description: 'Additional "docker ps" options. Use "-a" to cleanup non-running containers. Do not override unless you understand what you are doing.' - bool: name: dry_run default: 'true' description: 'Whether to do a dry-run' - bool: name: verbose default: 'false' description: 'Whether to be verbose' - string: name: scripts_branch default: refs/remotes/origin/master description: 'Scripts revision to use' disabled: false node: tcwg-x86_64-build concurrent: false display-name: 'TCWG CCC Cleanup stale containers' triggers: - timed: '@daily' scm: - git: url: https://git-us.linaro.org/toolchain/jenkins-scripts.git refspec: +refs/changes/*:refs/remotes/changes/* branches: - ${scripts_branch} skip-tag: true shallow-clone: true wipe-workspace: true axes: - axis: type: slave name: label values: - tcwg-aarch64-build-01 - tcwg-aarch64-build-02 - tcwg-aarch64-test-02 - tcwg-x86_64-build-01 - tcwg-x86_64-build-02 - tcwg-x86_64-build-03 - tcwg-x86_64-build-04 - tcwg-x86_64-build-05 - tcwg-x86_64-build-06 - tcwg-x86_64-build-07 - tcwg-x86_64-build-08 execution-strategy: sequential: false wrappers: - timeout: timeout: 600 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' - build-name: name: '#${BUILD_NUMBER}' builders: - shell: | #!/bin/bash set -ex ./tcwg-cleanup-stale-containers.sh --hours $hours --docker_ps_opts "$docker_ps_opts" --dry_run $dry_run --verbose $verbose publishers: - email: recipients: 'maxim.kuvyrkov@linaro.org christophe.lyon@linaro.org'