Try a first config

This commit is contained in:
Adrien Ferrand 2018-09-16 11:39:13 +02:00
parent e696d37b9b
commit 5856ec7eac

47
.circleci/config.yml Normal file
View File

@ -0,0 +1,47 @@
version: 2
jobs:
build:
docker:
- image:17.07.0-ce-git
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
command:
docker build -t adferrand/backuppc:${CIRCLE_TAG} .
- run:
command:
docker save adferrand/backuppc:${CIRCLE_TAG} > docker-backuppc.tar
- persist_to_workspace:
paths:
- docker-backuppc.tar
deploy:
steps:
- attach_workspace:
at: /tmp/workspace
- setup_remote_docker:
docker_layer_caching: true
- run:
command:
docker load < /tmp/workspace/docker-backuppc.tar
- run:
command:
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
- deploy:
command:
docker push adferrand/backuppc:${CIRCLE_TAG}
workflows:
version: 2
build-n-deploy:
jobs:
- build:
filters:
branches:
only: ^circleci$
- deploy:
requires:
- build
filters:
branches:
only: ^circleci$