File tree 1 file changed +65
-0
lines changed
1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ jobs :
3
+ test :
4
+ docker :
5
+ - image : circleci/golang:latest
6
+ steps :
7
+ - checkout
8
+ - run : go get -v -t -d ./...
9
+ - run : go test -v ./
10
+ - run : go test -v ./cmd/jid
11
+ build :
12
+ docker :
13
+ - image : circleci/golang:latest
14
+ steps :
15
+ - checkout
16
+ - run :
17
+ name : update packages
18
+ command : go get -v -t -d ./...
19
+ - run :
20
+ name : install gox
21
+ command : go get github.com/mitchellh/gox
22
+ - run :
23
+ name : build jid
24
+ command : cd cmd/jid && gox -ldflags '-w -s'
25
+ - persist_to_workspace :
26
+ root : .
27
+ paths :
28
+ - cmd/jid/*
29
+ deploy :
30
+ docker :
31
+ - image : circleci/golang:latest
32
+ steps :
33
+ - attach_workspace :
34
+ at : .
35
+ - run :
36
+ name : make a zip dir
37
+ command : mkdir builds
38
+ - run :
39
+ name : create zip files
40
+ command : |
41
+ for name in `cd cmd/jid && find jid_* | grep -v .go`; do
42
+ zip builds/${name}.zip cmd/jid/$name
43
+ done
44
+ - run :
45
+ name : list binary
46
+ command : ls builds
47
+ workflows :
48
+ version : 2
49
+ build_and_deploy :
50
+ jobs :
51
+ - test
52
+ - build :
53
+ requires :
54
+ - test
55
+ # filters:
56
+ # tags:
57
+ # only: /.*/
58
+ - deploy :
59
+ requires :
60
+ - build
61
+ # filters:
62
+ # tags:
63
+ # only: /.*/
64
+ # branches:
65
+ # only: master
You can’t perform that action at this time.
0 commit comments