adds CI config and dockerfile

This commit is contained in:
Jeffrey Paul 2020-03-17 21:02:06 -07:00
parent 8d207f8190
commit e3a7f53412
2 changed files with 33 additions and 0 deletions

9
.drone.yml Normal file
View File

@ -0,0 +1,9 @@
kind: pipeline
name: default
pipeline:
build:
image: plugins/docker
commands:
- >
docker build .

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM golang:1.13 as builder
WORKDIR /go/src/git.eeqj.de/datavibe/api
COPY . .
#RUN make lint && make build
RUN make build
WORKDIR /go
RUN tar cvfz go-src.tgz src && du -sh *
# this container doesn't do anything except hold the build artifact
# and make sure it compiles.
FROM alpine
COPY --from=builder /go/src/git.eeqj.de/datavibe/api/api /bin/api
# put the source in there too for safekeeping
COPY --from=builder /go/go-src.tgz /usr/local/src/go-src.tgz
CMD /bin/api
# FIXME add testing