Skip to content

Commit 61755d9

Browse files
author
Daisuke Morita
authored
Merge pull request #673 from cloudwan/circle-1.0-to-2.0
[BL-97] Migrate Circle 1.0 to 2.0
2 parents 2799c47 + d202eb2 commit 61755d9

File tree

2 files changed

+51
-42
lines changed

2 files changed

+51
-42
lines changed

.circleci/config.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: 2
2+
3+
jobs:
4+
build:
5+
docker:
6+
- image: circleci/golang:1.9
7+
working_directory: /go/src/github.com/cloudwan/gohan
8+
steps:
9+
- checkout
10+
- run: go version
11+
- run: make deps gen lint build
12+
test:
13+
docker:
14+
- image: circleci/golang:1.9
15+
working_directory: /go/src/github.com/cloudwan/gohan
16+
steps:
17+
- checkout
18+
- run: curl -L https://github.com/coreos/etcd/releases/download/v3.1.7/etcd-v3.1.7-linux-amd64.tar.gz -o etcd-v3.1.7-linux-amd64.tar.gz
19+
- run: tar xzvf etcd-v3.1.7-linux-amd64.tar.gz
20+
- run: sudo install etcd-v3.1.7-linux-amd64/etcd /usr/bin
21+
- run: go get github.com/mattn/goveralls
22+
- run: make test
23+
deploy:
24+
docker:
25+
- image: circleci/golang:1.9
26+
working_directory: /go/src/github.com/cloudwan/gohan
27+
steps:
28+
- checkout
29+
- run:
30+
name: Upload package to Github
31+
command: |
32+
go get github.com/karalabe/xgo
33+
./tools/crosscompile.sh
34+
sudo apt-get install -y zip
35+
curl -L https://github.com/tcnksm/ghr/releases/download/v0.5.0/ghr_v0.5.0_linux_amd64.zip -o ghr_v0.5.0_linux_amd64.zip
36+
unzip ghr_v0.5.0_linux_amd64.zip
37+
chmod 0755 ghr
38+
./ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -replace pre-release dist/
39+
40+
workflows:
41+
version: 2
42+
build_test_deploy:
43+
jobs:
44+
- build
45+
- test
46+
- deploy:
47+
requires:
48+
- test
49+
filters:
50+
branches:
51+
only: master

circle.yml

-42
This file was deleted.

0 commit comments

Comments
 (0)