-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set up parameter store for sensitive env vars and add versioning to d…
…emo images
- Loading branch information
1 parent
c3da586
commit 07e51ba
Showing
11 changed files
with
54 additions
and
18 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,23 +1,32 @@ | ||
# buildspec for deploying latest changes to main development branch | ||
version: 0.2 | ||
env: | ||
parameter-store: | ||
BRAINTREE_TOKEN: "/pwa/BRAINTREE_TOKEN" | ||
MAGENTO_BACKEND_URL: "/pwa/MAGENTO_BACKEND_URL" | ||
phases: | ||
install: | ||
commands: | ||
- echo install step... | ||
pre_build: | ||
commands: | ||
- echo logging in to AWS ECR... | ||
- $(aws ecr get-login --no-include-email --region us-east-1) | ||
- echo copying env vars to env file | ||
- sed -i "s%MAGENTO_BACKEND_URL=redacted%MAGENTO_BACKEND_URL=${MAGENTO_BACKEND_URL}%g" ./docker/.env.docker.prod | ||
- sed -i "s/BRAINTREE_TOKEN=redacted/BRAINTREE_TOKEN=${BRAINTREE_TOKEN}/g" ./docker/.env.docker.prod | ||
- VERSION=$CODEBUILD_RESOLVED_SOURCE_VERSION | ||
- echo VERSION=$VERSION | ||
build: | ||
commands: | ||
- echo build Docker image on `date` | ||
- docker build -f Dockerfile.prod -t pwa-demo:latest . | ||
- docker tag pwa-demo:latest 276375911640.dkr.ecr.us-east-1.amazonaws.com/pwa-demo | ||
- docker tag pwa-demo:latest 276375911640.dkr.ecr.us-east-1.amazonaws.com/pwa-demo:latest | ||
- docker tag pwa-demo:latest 276375911640.dkr.ecr.us-east-1.amazonaws.com/pwa-demo:$VERSION | ||
post_build: | ||
commands: | ||
- echo build Docker image complete `date` | ||
- echo push latest Docker images to ECR... | ||
- docker push 276375911640.dkr.ecr.us-east-1.amazonaws.com/pwa-demo | ||
- docker push 276375911640.dkr.ecr.us-east-1.amazonaws.com/pwa-demo:latest | ||
- docker push 276375911640.dkr.ecr.us-east-1.amazonaws.com/pwa-demo:$VERSION | ||
- sed -i "s/:latest/:${VERSION}/g" Dockerrun.aws.json | ||
artifacts: | ||
files: | ||
- Dockerrun.aws.json |
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
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
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
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
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
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
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
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
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
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