/
wercker.yml
52 lines (52 loc) · 1.5 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
# The container definition we want to use for developing our application
box:
id: golang
ports:
- "6336"
# Defining the dev pipeline
dev:
steps:
- internal/watch:
code: |
go build ./...
./source
reload: true
build:
steps:
- install-packages:
packages: nodejs npm
- script:
name: dashboard build
code: |
git clone https://github.com/daptin/dadadash builddaptinweb && cd builddaptinweb
npm install @quasar/cli
npm install
npm run build
ls -lah dist/spa
printf "Dashboard build complete"
cd ..
mv builddaptinweb/dist/spa ./daptinweb
rm -rf builddaptinweb
ls -lah ./daptinweb
- script:
name: go get rice
code: |
go get github.com/GeertJohan/go.rice/rice
rice embed-go
- script:
name: go build
code: |
go build -ldflags='-extldflags "-static"' -a -installsuffix cgo -o main
- script:
name: go test
code: |
go test ./...
- internal/docker-build:
dockerfile: Dockerfile
image-name: daptin/daptin:wercker # name used to refer to this image until it's pushed
- internal/docker-push:
image-name: daptin/daptin:wercker
username: $DOCKER_USERNAME # Docker Hub username. When using CLI, set using "export X_USERNAME=<username>"
password: $DOCKER_PASSWORD # Docker Hub password. When using CLI, set using "export X_PASSWORD=<password>"
repository: docker.io/daptin/daptin
tag: wercker