updated drone and added Dockerfile

This commit is contained in:
Nils Stinnesbeck 2019-11-23 13:21:14 +01:00
parent e351a9d1a5
commit 74a7c6ba1e
Signed by: nils
GPG Key ID: 86D4882C6C6CA48B
2 changed files with 20 additions and 25 deletions

View File

@ -1,27 +1,19 @@
workspace:
base: /go
path: src/github.com/FreifunkBremen/yanic
kind: pipeline
name: build yanic
pipeline:
build:
image: golang:latest
steps:
- name: backend
image: golang
commands:
- go get ./...
- go get
- go build
codestyle:
image: golang:latest
commands:
- go get github.com/client9/misspell/cmd/misspell
- misspell -error .
- if [ -n "$(gofmt -s -l .)" ]; then echo "Go code is not formatted, run 'gofmt -s -w .'" >&2; exit 1; fi
test:
image: golang:latest
commands:
- go get github.com/stretchr/testify/assert
- go test ./... -v -cover
test-race:
image: golang:latest
commands:
- go get github.com/stretchr/testify/assert
- go test ./... -v -race
- go test
- name: docker
image: plugins/docker
settings:
repo: thunderstorm99/yanic
username:
from_secret: docker_username
password:
from_secret: docker_password

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM scratch
COPY yanic /yanic
ENTRYPOINT ["/yanic"]