File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 25
25
# it's required to set the following environment variables for an IAM user with
26
26
# permissions on ``build-tools`` S3's bucket:
27
27
#
28
+ # AWS_REGION
28
29
# AWS_ACCESS_KEY_ID
29
30
# AWS_SECRET_ACCESS_KEY
30
- # AWS_ENDPOINT_URL
31
+ # AWS_BUILD_TOOLS_BUCKET_NAME
31
32
#
32
33
#
33
34
# USAGE
@@ -95,9 +96,17 @@ docker container kill $CONTAINER_ID
95
96
# Upload the .tar.gz to S3
96
97
AWS_ENDPOINT_URL=" ${AWS_ENDPOINT_URL:- http:// localhost: 9000} "
97
98
AWS_BUILD_TOOLS_BUCKET=" ${AWS_BUILD_TOOLS_BUCKET:- build-tools} "
98
- AWS_ACCESS_KEY_ID=" ${AWS_ACCESS_KEY_ID:- admin} " \
99
- AWS_SECRET_ACCESS_KEY=" ${AWS_SECRET_ACCESS_KEY:- password} " \
100
- aws --endpoint-url $AWS_ENDPOINT_URL s3 cp $OS -$TOOL -$VERSION .tar.gz s3://$AWS_BUILD_TOOLS_BUCKET
99
+ AWS_ACCESS_KEY_ID=" ${AWS_ACCESS_KEY_ID:- admin} "
100
+ AWS_SECRET_ACCESS_KEY=" ${AWS_SECRET_ACCESS_KEY:- password} "
101
+
102
+ if [[ -z $AWS_REGION ]]
103
+ then
104
+ # Development environment
105
+ aws --endpoint-url $AWS_ENDPOINT_URL s3 cp $OS -$TOOL -$VERSION .tar.gz s3://$AWS_BUILD_TOOLS_BUCKET
106
+ else
107
+ # Production environment does not requires `--endpoint-url`
108
+ aws s3 cp $OS -$TOOL -$VERSION .tar.gz s3://$AWS_BUILD_TOOLS_BUCKET
109
+ fi
101
110
102
111
# Delete the .tar.gz file from the host
103
112
rm $OS -$TOOL -$VERSION .tar.gz
You can’t perform that action at this time.
0 commit comments