version: 0.2 phases: install: runtime-versions: python: 3.8 nodejs: 14 commands: - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 & - timeout 15 sh -c "until docker info; do echo .; sleep 1; done" - npm install aws-cdk-lib aws-cdk -g - npm install - CDK_STACK=$(aws cloudformation list-stacks --query 'StackSummaries[?(StackName==`CDKToolkit` && StackStatus==`CREATE_COMPLETE`)].StackId' --output text) build: commands: - if [ -z "$CDK_STACK" ] ; then cdk bootstrap ; else echo "Already bootstrapped" ; fi - cdk deploy CloudhsmBaseStack --context express="false" --require-approval=never --verbose -O out.json artifacts: files: 'out.json'