forked from cravall/mongo-k8s-sidecar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
27 lines (24 loc) · 862 Bytes
/
circle.yml
File metadata and controls
27 lines (24 loc) · 862 Bytes
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
27
machine:
environment:
CONTAINER_NAME: quay.io/redsift/mongo-k8s-sidecar
services:
- docker
dependencies:
override:
- docker info
- docker login -e ${QUAY_EMAIL} -u ${QUAY_USER} -p ${QUAY_PASS} quay.io
- |
VERSION=$(git describe --exact-match --tags 2>/dev/null || git rev-parse --short HEAD)
sudo docker build -t ${CONTAINER_NAME} .
echo "Tagging as ${CONTAINER_NAME}:${VERSION}"
docker tag -f ${CONTAINER_NAME}:latest ${CONTAINER_NAME}:${VERSION}
echo "Tagging as ${CONTAINER_NAME}:${CIRCLE_BRANCH}"
docker tag -f ${CONTAINER_NAME}:latest ${CONTAINER_NAME}:${CIRCLE_BRANCH}
test:
override:
- docker run -d -e ROOT_URL=http://circleci.build ${CONTAINER_NAME}; sleep 5
deployment:
prod:
branch: /.*/
commands:
- docker push ${CONTAINER_NAME} > /dev/null