Merged
Conversation
hbradio
commented
Jul 6, 2019
|
|
||
| cp ./compose/django/Dockerfile . | ||
| docker build -t 795223264977.dkr.ecr.us-east-2.amazonaws.com/rovercode-web-service:$1 . | ||
| eval $(aws ecr get-login --region us-east-2 --no-include-email) # requires AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY secret environment variable set in Travis |
Collaborator
Author
There was a problem hiding this comment.
I know this looks bad, but it's really cool. get-login is an AWS CLI utility that takes your AWS role credentials and returns the text of a valid Docker login command to your account. If you eval what it returns, you log Docker into your ECR.
cabarnes
requested changes
Jul 6, 2019
ecr-deploy.sh
Outdated
|
|
||
| pip install awscli | ||
|
|
||
| cp ./compose/django/Dockerfile . |
Member
There was a problem hiding this comment.
You should be able to use the -f argument for docker build to provide the path to this file and not have to copy it
cabarnes
approved these changes
Jul 7, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes travis build and deploy the Docker image to our private Elastic Container Repository.
It relies on finding AWS role credentials in Travis' secret environment (newer feature of Travis, which is pretty cool). I've added them there.
We tag the image as either
alpha,beta, orprod.Here is an example of a successful deploy on my working branch.