From 74a7c6ba1e75eb49c0f29b0113d3fe2dd18de491 Mon Sep 17 00:00:00 2001 From: Nils Jakobi Date: Sat, 23 Nov 2019 13:21:14 +0100 Subject: [PATCH] updated drone and added Dockerfile --- .drone.yml | 42 +++++++++++++++++------------------------- Dockerfile | 3 +++ 2 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml index 8c3e7de..dedcb15 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,27 +1,19 @@ -workspace: - base: /go - path: src/github.com/FreifunkBremen/yanic +kind: pipeline +name: build yanic -pipeline: - build: - image: golang:latest - commands: - - 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 +steps: +- name: backend + image: golang + commands: + - go get + - go build + - go test +- name: docker + image: plugins/docker + settings: + repo: thunderstorm99/yanic + username: + from_secret: docker_username + password: + from_secret: docker_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..973ecf7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY yanic /yanic +ENTRYPOINT ["/yanic"]