update configs
parent
6196948b47
commit
591123410f
@ -0,0 +1,19 @@
|
||||
# deploy.sh
|
||||
#! /bin/bash
|
||||
|
||||
SHA1=$1
|
||||
|
||||
# Deploy image to Docker Hub
|
||||
docker push circleci/hello:$SHA1
|
||||
|
||||
# Create new Elastic Beanstalk version
|
||||
EB_BUCKET=sinatra-hello-bucket
|
||||
DOCKERRUN_FILE=$SHA1-Dockerrun.aws.json
|
||||
sed "s/<TAG>/$SHA1/" < Dockerrun.aws.json.template > $DOCKERRUN_FILE
|
||||
aws s3 cp $DOCKERRUN_FILE s3://$EB_BUCKET/$DOCKERRUN_FILE
|
||||
aws elasticbeanstalk create-application-version --application-name sinatra-hello \
|
||||
--version-label $SHA1 --source-bundle S3Bucket=$EB_BUCKET,S3Key=$DOCKERRUN_FILE
|
||||
|
||||
# Update Elastic Beanstalk environment to new version
|
||||
aws elasticbeanstalk update-environment --environment-name sinatra-hello-env \
|
||||
--version-label $SHA1
|
Loading…
Reference in New Issue