Move scripts used by travis jobs under travis folder because when mirroring all scripts folders are excluded

This commit is contained in:
cagache
2021-04-01 18:44:35 +03:00
parent 3f25704425
commit e7d25af3b4
19 changed files with 44 additions and 44 deletions

21
travis/scripts/cleanup.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
echo "=========================== Starting Cleanup Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vx
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
# Stop and remove the containers
docker ps -a -q | xargs -l -r docker stop
docker ps -a -q | xargs -l -r docker rm
pip install awscli
printf "${CREATE_BUCKET_AWS_ACCESS_KEY}\n${CREATE_BUCKET_AWS_SECRET_KEY}\n\n\n" | aws configure
aws s3 ls | awk '{print $3}' | grep "^${S3_BUCKET_NAME}" | xargs -l -r -I{} aws s3 rb "s3://{}" --force
aws s3 ls | awk '{print $3}' | grep "^${S3_BUCKET2_NAME}" | xargs -l -r -I{} aws s3 rb "s3://{}" --force
popd
set +vx
echo "=========================== Finishing Cleanup Script =========================="