This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcircle.yml
77 lines (74 loc) · 2.02 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
68
69
70
71
72
73
74
75
76
77
version: 2
jobs:
build:
working_directory: /go/src/github.com/openfresh/plasma
docker:
- image: openfresh/golang:latest
- image: redis:3.2.9-alpine
steps:
- checkout
- setup_remote_docker:
version: 17.06.0-ce
reusable: true
- run:
name: install Docker clinet
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:
name: deps
command: make deps
- run:
name: test
command: make test
- run:
name: go build
command: make build
- run:
name: docker build test
command: docker build -t openfresh/plasma:latest .
- persist_to_workspace:
root: .
paths:
- .
release_latest:
working_directory: /go/src/github.com/openfresh/plasma
docker:
- image: openfresh/golang:latest
steps:
- attach_workspace:
at: .
- setup_remote_docker:
version: 17.06.0-ce
reusable: true
- run:
name: install Docker clinet
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:
name: docker build
command: docker build -t openfresh/plasma:latest .
- run:
name: docker login
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
name: release latest
command: docker push openfresh/plasma:latest
workflows:
version: 2
build_and_release:
jobs:
- build
- release_latest:
requires:
- build
filters:
branches:
only: master