Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
switch to using go modules (#315)
Browse files Browse the repository at this point in the history
* switch to using vgo

* update vendor dependencies

remove vendor dependencies

* add go modules to drone

* change environment variable syntax

* add environment variable to benchmark

* add git as build dependency

* change dockerfile logic
  • Loading branch information
nirnanaaa authored and rhysemmas committed Nov 1, 2019
1 parent f7c1cd8 commit 78d1ec2
Show file tree
Hide file tree
Showing 1,898 changed files with 197 additions and 751,681 deletions.
4 changes: 4 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ pipeline:
test:
secrets: [ codecov_token ]
image: golang:1.12
environment:
GO111MODULE: "on"
commands:
- make test
- make coverage.txt
- ./ci/codecov.sh

benchmarks:
image: golang:1.12
environment:
GO111MODULE: "on"
commands:
- make bench

Expand Down
22 changes: 17 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
FROM golang:1.12-alpine3.10 as build
RUN apk add --no-cache make
WORKDIR /go/src/github.com/uswitch/kiam
ADD . .
FROM golang:1.12.5 as build
ENV GO111MODULE=on

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

COPY cmd/ cmd/
COPY pkg/ pkg/
COPY proto/ proto/
COPY Makefile Makefile

RUN make bin/kiam-linux-amd64

FROM alpine:3.8
RUN apk --no-cache add iptables
COPY --from=build /go/src/github.com/uswitch/kiam/bin/kiam-linux-amd64 /kiam
COPY --from=build /workspace/bin/kiam-linux-amd64 /kiam
CMD []
Loading

0 comments on commit 78d1ec2

Please sign in to comment.