mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
APPS-261 Put tags on the S3 test buckets
This commit is contained in:
@@ -13,10 +13,10 @@ 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
|
||||
|
||||
BUCKET_NAME="travis-ags-${TRAVIS_JOB_NUMBER}"
|
||||
S3_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_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
|
||||
|
@@ -21,6 +21,9 @@ aws s3api put-object-lock-configuration \
|
||||
--bucket "${S3_BUCKET2_NAME}" \
|
||||
--object-lock-configuration '{ "ObjectLockEnabled": "Enabled", "Rule": { "DefaultRetention": { "Mode": "COMPLIANCE", "Days": 1 }}}'
|
||||
|
||||
aws s3api put-bucket-tagging --bucket "${S3_BUCKET2_NAME}" \
|
||||
--tagging="TagSet=[{Key=toDeleteAfterTests,Value=true}]"
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Create Worm Bucket Script =========================="
|
@@ -2,22 +2,19 @@
|
||||
|
||||
export DOCKER_COMPOSE_PATH=$1
|
||||
|
||||
if [ -z "$DOCKER_COMPOSE_PATH" ]
|
||||
then
|
||||
if [ -z "$DOCKER_COMPOSE_PATH" ] ; then
|
||||
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Fix uppercase bucket name if set
|
||||
if [ -n "${S3_BUCKET_NAME}" ]
|
||||
then
|
||||
if [ -n "${S3_BUCKET_NAME}" ] ; then
|
||||
export S3_BUCKET_NAME="${S3_BUCKET_NAME,,}"
|
||||
fi
|
||||
|
||||
export DOCKER_COMPOSE_PATH=$1
|
||||
|
||||
if [ -z "$DOCKER_COMPOSE_PATH" ]
|
||||
then
|
||||
if [ -z "$DOCKER_COMPOSE_PATH" ] ; then
|
||||
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
|
||||
exit 1
|
||||
fi
|
||||
@@ -27,8 +24,7 @@ echo "Starting AGS stack in ${DOCKER_COMPOSE_PATH}"
|
||||
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
|
||||
docker-compose --file "${DOCKER_COMPOSE_PATH}" --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
if [ $? -eq 0 ] ; then
|
||||
echo "Docker Compose started ok"
|
||||
else
|
||||
echo "Docker Compose failed to start" >&2
|
||||
|
Reference in New Issue
Block a user