Skip to content

Instantly share code, notes, and snippets.

@joshcass
Created May 29, 2020 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcass/872db0da0158c723f7268c82db4da005 to your computer and use it in GitHub Desktop.
Save joshcass/872db0da0158c723f7268c82db4da005 to your computer and use it in GitHub Desktop.
Example of our buildspec
version: 0.2
phases:
install:
runtime-versions:
docker: latest
pre_build:
commands:
- echo Fetching data from Atlas
- ./go-get-db
- echo Logging in to ECR
- $(aws ecr get-login --no-include-email --region <aws region>)
build:
commands:
- echo Building docker image on `date`
- docker build -t bonusly-mongodb .
- docker tag bonusly-mongodb:latest <ecr repo url>/<image_tag>
post_build:
commands:
- echo Build docker image complete on `date`
- echo push latest image to ECR
- docker push <ecr repo url>/<image_tag>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment