-
Notifications
You must be signed in to change notification settings - Fork 1
/
wercker.yml
68 lines (60 loc) · 2.13 KB
/
wercker.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
box: golang
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
# services:
# - postgres
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongo
# http://devcenter.wercker.com/docs/services/mongodb.html
build:
# The steps that will be executed on build
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# Sets the go workspace and places you package
# at the right place in the workspace tree
- setup-go-workspace
# Gets the dependencies
- script:
name: go get
code: |
go get github.com/stretchr/testify/assert
go get -v ./...
# Build the project
- script:
name: go build
code: |
go get -v ./...
go build -v ./...
# Test the project
- script:
name: go test
code: |
go get -v ./...
go test -v ./...
deploy:
steps:
- setup-go-workspace
- script:
name: install sshpass & install dependent
code: |
go get github.com/stretchr/testify/assert
go get -v ./...
- install-packages:
packages: git ssh-client liberror-perl sshpass
- script:
name: deploy to daocloud
code: |
go get -v ./...
go build -v
##export DEPLOY_SSH_PASS=$DAOCLOUD_SSH_PASS
##export DEPLOY_SSH_URL=$DAOCLOUD_SSH_URL
##chmod a+x ./deploy.sh
##./deploy.sh
#sshpass -p $DAOCLOUD_SSH_PASS ssh -o StrictHostKeyChecking=no $DAOCLOUD_SSH_URL "[ -f nanoweb ] && rm nanoweb "
#sshpass -p $DAOCLOUD_SSH_PASS scp -o stricthostkeychecking=no nanoweb ${DAOCLOUD_SSH_URL}:/home/ubuntu
#sshpass -p $DAOCLOUD_SSH_PASS ssh -o StrictHostKeyChecking=no $DAOCLOUD_SSH_URL "killall nanoweb ; chmod a+x nanoweb ; nohup ./nanoweb&"