Use .tasks file to trigger removal of stale cloud resources

This commit is contained in:
Alexander Todorov 2019-08-29 10:59:22 +03:00 committed by Alexander Todorov
parent ad54403c6d
commit 9af650798c
1 changed files with 18 additions and 0 deletions

18
.tasks Normal file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# When run automated, randomize to minimize stampeding herd
if [ -t 0 ]; then
chance=10
else
chance=$(shuf -i 0-10 -n 1)
fi
if [ $chance -gt 9 ]; then
# command lines representing pending work. one will be executed
# randomly by the calling environment
echo "./tests/cleanup/remove_old_objects_alibaba.sh"
echo "./tests/cleanup/remove_old_objects_aws.sh"
echo "./tests/cleanup/remove_old_objects_azure.sh"
echo "./tests/cleanup/remove_old_objects_openstack.sh"
echo "./tests/cleanup/remove_old_objects_vmware.sh"
fi