APPS-261 changes to scripts

This commit is contained in:
Bogdan
2020-08-13 18:55:02 +03:00
parent a8cf3c5dff
commit e2d62026ee
2 changed files with 6 additions and 8 deletions

View File

@@ -10,12 +10,11 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../"
docker ps -a -q | xargs -l -r docker stop
docker ps -a -q | xargs -l -r docker rm
sudo apt-get update
sudo apt-get install -q -y awscli
pip install awscli
printf "${CREATE_BUCKET_AWS_ACCESS_KEY}\n${CREATE_BUCKET_AWS_SECRET_KEY}\n\n\n" | aws configure
BUCKET_NAME="travis-ags-${TRAVIS_BUILD_NUMBER}-${TRAVIS_JOB_NUMBER}"
S3_BUCKET2_NAME="travis-ags-worm-${TRAVIS_BUILD_NUMBER}-${TRAVIS_JOB_NUMBER}-b2"
BUCKET_NAME="travis-ags-${TRAVIS_JOB_NUMBER}"
S3_BUCKET2_NAME="travis-ags-worm-${TRAVIS_JOB_NUMBER}-b2"
aws s3 ls | awk '{print $3}' | grep "^${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