- 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: slave_list default: 'tcwg-apm-01 tcwg-apm-02 tcwg-apm-03 tcwg-apm-04 tcwg-tk1-01 tcwg-tk1-02 tcwg-tk1-03 tcwg-tk1-04 tcwg-tx1-01 tcwg-tx1-02 tcwg-tx1-03 tcwg-tx1-04 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' description: 'List of slaves to run on -- should be a subset of slave axis' - string: name: cleanup_running_hours default: '-10' description: 'Delete containers that are more then "hours" old. Use "0" to disable time check. Use negative values for dry-run.' - string: name: cleanup_stopped_hours default: '240' description: 'Delete containers that are more then "hours" old. Use "0" to disable time check. Use negative values for dry-run.' - bool: name: cleanup_volumes default: 'false' description: 'Whether to cleanup dangling volumes' - bool: name: cleanup_images default: 'true' description: 'Whether to cleanup images' - bool: name: verbose default: 'false' description: 'Whether to be verbose' - string: name: scripts_branch default: refs/heads/master description: 'Scripts revision to use' disabled: false node: tcwg-coordinator 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/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/* branches: - ${scripts_branch} skip-tag: true shallow-clone: true wipe-workspace: true axes: - axis: type: slave name: label values: - tcwg-apm-01 - tcwg-apm-02 - tcwg-apm-03 - tcwg-apm-04 - tcwg-tk1-01 - tcwg-tk1-02 - tcwg-tk1-03 - tcwg-tk1-04 - tcwg-tx1-01 - tcwg-tx1-02 - tcwg-tx1-03 - tcwg-tx1-04 - 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 - axis: type: dynamic name: slave values: - slave_list execution-strategy: combination-filter: | label==slave 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 --cleanup-running-hours $cleanup_running_hours --cleanup-stopped-hours $cleanup_stopped_hours --cleanup-volumes $cleanup_volumes --cleanup-images $cleanup_images --verbose $verbose publishers: - email: recipients: tcwg@linaro.org