Add CI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2020-11-19 01:00:29 +01:00
parent 6c9a44f3db
commit 80b18c450d
2 changed files with 46 additions and 0 deletions

27
.drone.yml Normal file
View File

@ -0,0 +1,27 @@
---
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: arm
steps:
- name: build
image: golang:alpine
commands:
- go build -v -o chunkvalidator
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: nemunaire/chunkvalidator
tags: latest
when:
branch:
- master

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM golang:alpine as gobuild
WORKDIR /go/src/git.nemunai.re/chunkvalidator
COPY *.go go.mod go.sum ./
RUN go get -d -v && \
go build -v
FROM alpine
EXPOSE 8081
CMD ["chunkvalidator"]
COPY --from=gobuild /go/src/git.nemunai.re/chunkvalidator/chunkvalidator /usr/sbin/chunkvalidator