-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
67 lines (66 loc) · 1.68 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: 2
jobs:
build_image:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- setup_remote_docker
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run: make build-image
check_version:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- run: make check-version
deploy:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- setup_remote_docker
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run: make build-image
- deploy:
name: deploy
command: make push-to-registry
workflows:
version: 2
build_test_deploy:
jobs:
- check_version:
filters:
branches:
ignore: master
- build_image:
filters:
tags:
only: /[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: master
- deploy:
context: org-docker-hub
requires:
- build_image
- check_version
filters:
tags:
only:
- /[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: /.*/