forked from awslabs/aws-servicebroker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
26 lines (24 loc) · 916 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:
variables:
LATEST_TAG: latest
parameter-store:
DOCKER_REPO: "/k8s/aws-servicebroker/docker-repo"
DOCKER_REGISTRY: "/k8s/aws-servicebroker/docker-registry"
DOCKER_LOGIN: "/k8s/aws-servicebroker/docker-login"
DOCKER_USER: "/k8s/aws-servicebroker/docker-user"
VERSION_TAG: "/k8s/aws-servicebroker/image-version"
phases:
build:
commands:
- echo Entered the build phase...
- DOCKER_PATH="$DOCKER_REGISTRY/$DOCKER_REPO"
- echo "DOCKER_PATH=${DOCKER_PATH}"
- echo "DOCKER_USER=${DOCKER_USER}"
- echo "TAG=${VERSION_TAG}"
- TAG="$VERSION_TAG"
- docker build -t $DOCKER_PATH:$LATEST_TAG ./
- echo $DOCKER_LOGIN | docker login $DOCKER_REGISTRY -u $DOCKER_USER --password-stdin
- docker push $DOCKER_PATH:$LATEST_TAG
- docker tag $DOCKER_PATH:$LATEST_TAG $DOCKER_PATH:$TAG
- docker push $DOCKER_PATH:$TAG