Created
November 20, 2020 15:59
-
-
Save samhstn/33039fb2c20aff9f4c3bee476fc1c767 to your computer and use it in GitHub Desktop.
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
# Following instructions here: | |
# https://aws.amazon.com/blogs/devops/announcing-local-build-support-for-aws-codebuild/ | |
curl -o codebuild_build.sh https://raw.githubusercontent.com/aws/aws-codebuild-docker-images/master/local_builds/codebuild_build.sh | |
chmod +x codebuild_build.sh | |
source .env | |
S3_CODEBUILD_BUCKET_NAME=samhstn-codebuild-${AWS_ADMIN_ACCOUNT_ID} | |
ROUTE_53_ROLE_ARN="$(aws cloudformation describe-stacks \ | |
--profile samhstn-root \ | |
--stack-name route53role \ | |
--query "Stacks[*].Outputs[?OutputKey=='Route53RoleArn'].OutputValue|[0][0]" \ | |
--output text 2>&1)" | |
cat > .codebuild_envs<< EOF | |
S3_CODEBUILD_BUCKET_NAME=$S3_CODEBUILD_BUCKET_NAME | |
ROUTE_53_ROLE_ARN=$ROUTE_53_ROLE_ARN | |
SAMHSTN_HOSTED_ZONE_ID=$SAMHSTN_HOSTED_ZONE_ID | |
EOF | |
./codebuild_build.sh -i $AWS_ADMIN_ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/samhstn -a ./artifacts -b infra/samhstn/buildspec.yml -e .codebuild_envs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment