Skip to content

Commit

Permalink
Small fixes to asdf image upload script
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Oct 12, 2021
1 parent 2cff837 commit 933f5c1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/compile_version_upload_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# To create a pre-compiled cached version and make it available on production,
# **the script must be ran from a builder (build-default or build-large)** and
# it's required to set the following environment variables for an IAM user with
# permissions on ``readthedocs(inc)-build-tools`` S3's bucket:
# permissions on ``readthedocs(inc)-build-tools-prod`` S3's bucket:
#
# AWS_REGION
# AWS_ACCESS_KEY_ID
Expand Down Expand Up @@ -55,11 +55,12 @@
# ./scripts/compile_version_upload.sh python 3.9.7
# ./scripts/compile_version_upload.sh nodejs 14.17.6

set -e
set -e # Stop on errors
set -x # Echo commands

# Define variables
SLEEP=350
OS="ubuntu-20.04"
SLEEP=350 # Container timeout
OS="ubuntu-20.04" # Docker image name
TOOL=$1
VERSION=$2

Expand Down Expand Up @@ -117,9 +118,11 @@ AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY:-password}"
if [[ -z $AWS_REGION ]]
then
# Development environment
echo "Uploading to dev environment"
aws --endpoint-url $AWS_ENDPOINT_URL s3 cp $OS-$TOOL-$VERSION.tar.gz s3://$AWS_BUILD_TOOLS_BUCKET
else
# Production environment does not requires `--endpoint-url`
echo "Uploading to prod environment"
aws s3 cp $OS-$TOOL-$VERSION.tar.gz s3://$AWS_BUILD_TOOLS_BUCKET
fi

Expand Down

0 comments on commit 933f5c1

Please sign in to comment.