forked from evergreen-ci/spruce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEVPROD-5097: Prevent deploy_to_prod task from failing silently (ever…
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# This script runs the aws cli command to deploy the app to s3 | ||
# This script runs the AWS CLI command to deploy the app to S3. | ||
|
||
# Try this step and throw an error if it fails | ||
echo "Deploying to S3" | ||
aws s3 sync build/ s3://"${BUCKET}"/ --acl public-read --follow-symlinks --delete --exclude .env-cmdrc.json | ||
echo "Deployed to S3" | ||
|
||
if ! aws s3 sync build/ s3://"${BUCKET}"/ --acl public-read --follow-symlinks --delete --exclude .env-cmdrc.json; then | ||
echo "Deployment to S3 failed" | ||
exit 1 | ||
else | ||
echo "Successfully deployed to S3" | ||
fi |