Add job to delete stale nodes older than 24H on RS
[releng/builder.git] / jjb / opendaylight-infra-cleanup-stale-nodes.sh
1 #!/bin/bash
2
3 # Todo: As a safe check we could obtain the list of active jobs from Jenkins and
4 # compute the checksum from $JOB_NAME to check if any active nodes exist and
5 # skip deleting those nodes. This step may not be required since there is already
6 # 24H timeout in place for all jobs therefore all jobs are expected to complete
7 # within the timeout.
8
9 lftools openstack --os-cloud rackspace \
10     server list --days=1
11 lftools openstack --os-cloud rackspace \
12     server cleanup --days=1