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
CIUSER=ci | |
ACCOUNTID=<account-id> | |
# Create ECR repo | |
aws ecr create-repository <repo> --region <region> | |
# Create the CI user with appropricate permissions | |
aws iam create-user --user-name $CIUSER | |
aws iam attach-user-policy --user-name $CIUSER --policy-arn arn:aws:iam::aws:policy/AWSElasticBeanstalkFullAccess | |
aws iam attach-user-policy --user-name $CIUSER --policy-arn arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess |
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
machine: | |
services: | |
- docker | |
dependencies: | |
cache_directories: | |
- "~/docker" | |
- "~/.cabal" | |
- "~/.local" | |
- "~/.stack" |
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
# deploy.sh | |
#! /bin/bash | |
SHA1=$1 | |
# Push image to ECR | |
$(aws ecr get-login --region <region>) | |
docker push <account-id>.dkr.ecr.<region>.amazonaws.com/<repo>:$SHA1 | |
# Create new Elastic Beanstalk version |
OlderNewer