This repository has been archived by the owner on Apr 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathwercker.yml
58 lines (57 loc) · 1.86 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
box: wercker/[email protected]
steps:
- dlapiduz/github-create-deployment
build:
steps:
- setup-go-workspace
- script:
name: Populate cache
code: |
if test -d "$WERCKER_CACHE_DIR/go-pkg-cache"; then rsync -avzv --exclude "src/github.com/$WERCKER_GIT_OWNER" --exclude "pkg/linux_amd64/github.com/$WERCKER_GIT_OWNER" "$WERCKER_CACHE_DIR/go-pkg-cache/" "$GOPATH/" ; fi
- script:
name: run suite for govcoded
cwd: govcoded/
code: |
rm -f govcoded
go get -t ./...
go vet
go test ./...
go build ./...
- script:
name: run suite for govcode
cwd: govcode/
code: |
rm -f govcode
go get -t ./...
go vet
go build ./...
- script:
name: move deploy assets to deploy folder
code: |
cp govcode/govcode $WERCKER_OUTPUT_DIR
cp govcoded/govcoded $WERCKER_OUTPUT_DIR
echo "Deployment files for: $WERCKER_GIT_COMMIT" > $WERCKER_OUTPUT_DIR/README.md
- script:
name: Store cache
code: |
rsync -avzv --exclude "src/github.com/$WERCKER_GIT_OWNER" --exclude "pkg/linux_amd64/github.com/$WERCKER_GIT_OWNER" "$GOPATH/" "$WERCKER_CACHE_DIR/go-pkg-cache/"
deploy:
steps:
- script:
name: Configure git
code: |-
git config --global user.email "[email protected]"
git config --global user.name "wercker"
rm -rf .git
- script:
name: Deploy assets to deploy branch
code: |-
git init
git add .
git commit -m "deploy commit from $WERCKER_STARTED_BY [ci skip]"
git push -f $GIT_REMOTE master:deploy
- dlapiduz/github-create-deployment:
token: $GITHUB_TOKEN
environment: $GITHUB_DEPLOY_ENV
ref: deploy
auto_merge: false