forked from awslabs/amazon-ecs-local-container-endpoints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
26 lines (24 loc) · 931 Bytes
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
version: 0.2
env:
secrets-manager:
USERNAME: "com.amazonaws.ec2.madison.dockerhub.amazon-ecs-local-container-endpoints.credentials:username"
PASSWORD: "com.amazonaws.ec2.madison.dockerhub.amazon-ecs-local-container-endpoints.credentials:password"
phases:
install:
commands:
- echo '#!/bin/bash' > /usr/local/bin/ok; echo 'if [[ "$CODEBUILD_BUILD_SUCCEEDING" == "0" ]]; then exit 1; else exit 0; fi' >> /usr/local/bin/ok; chmod +x /usr/local/bin/ok
pre_build:
commands:
- echo "Logging into DockerHub..."
- docker login -u ${USERNAME} --password ${PASSWORD}
build:
# build and tag docker image. This will read ARCH_SUFFIX env var set in the
# Codebuild project.
commands:
- echo Build started on `date`
- echo Building Docker image...
- make build-image
- make publish-dockerhub
post_build:
commands:
- ok && echo Build completed on `date`