Login to docker

This commit is contained in:
Adrien Ferrand 2018-09-16 22:19:47 +02:00
parent a4758b6417
commit 6b4b32e0f2

View File

@ -7,7 +7,7 @@ jobs:
- run: - run:
command: | command: |
docker pull adferrand/backuppc || true docker pull adferrand/backuppc || true
docker build -t --cache-from adferrand/backuppc adferrand/backuppc . docker build --cache-from adferrand/backuppc -t adferrand/backuppc .
- run: - run:
command: | command: |
mkdir -p workspace mkdir -p workspace
@ -24,6 +24,9 @@ jobs:
- run: - run:
command: command:
docker load < /tmp/workspace/docker-backuppc.tar docker load < /tmp/workspace/docker-backuppc.tar
- run:
command:
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
- deploy: - deploy:
command: | command: |
if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest; else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}}; fi if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest; else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}}; fi