-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcircle.yml
38 lines (35 loc) · 1.17 KB
/
circle.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
27
28
29
30
31
32
33
34
35
36
37
38
machine:
services:
- docker
dependencies:
cache_directories:
- ~/.docker_images
- ~/.rocker_cache
pre:
- docker info
- if [[ -e ~/.docker_images/all.tar ]]; then docker load -i ~/.docker_images/all.tar; fi
- if [[ -e ~/.docker_images/tagged.tar ]]; then docker load -i ~/.docker_images/tagged.tar; fi
- docker images
override:
- ./build.sh
post:
- mkdir -p ~/.docker_images; docker images -aq | xargs docker save -o ~/.docker_images/all.tar
- mkdir -p ~/.docker_images; docker images | grep -o '^\S*' | grep -v none | tail -n +2 | xargs docker save -o ~/.docker_images/tagged.tar
test:
override:
- echo "Skipping tests"
deployment:
latest:
branch: master
owner: segfly-oss
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push segfly/ssh-gitway:latest
- docker push segfly/ssh-gitway:sample-git-server
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: segfly-oss
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag segfly/ssh-gitway:latest segfly/ssh-gitway:${CIRCLE_TAG}
- docker push segfly/ssh-gitway:${CIRCLE_TAG}