Skip to content

Commit

Permalink
Merge pull request #78 from skamboj/migrate-to-go-modules
Browse files Browse the repository at this point in the history
Migrate to go modules
  • Loading branch information
seeker89 authored Apr 2, 2020
2 parents e07ae6a + 34d84b2 commit c66050e
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 781 deletions.
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ services:
- docker

go:
- "1.10.x"
- "1.14.x"
- master

script:
- docker --version
# dep
- go get -u github.com/golang/dep/cmd/dep


# build locally and run locally
- make clean && make vendor && make && ./bin/goldpinger --help

# build an image and run the image
- make clean && make vendor && make build
- docker images
- docker run `make version` --help

# build an image using the multistage builder
- make clean && make build-multistage
- docker images
Expand All @@ -36,5 +34,5 @@ deploy:
skip_cleanup: true
on:
tags: true
go: "1.10.x"
go: "1.14.x"
condition: -n "$DOCKER_PASSWORD"
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM golang:1.11-alpine as builder
FROM golang:1.14-alpine as builder

# Install our build tools

RUN apk add --update git make bash
RUN go get -u github.com/golang/dep/cmd/dep

# Get dependencies

WORKDIR /go/src/github.com/bloomberg/goldpinger
COPY Gopkg.toml Gopkg.lock Makefile ./
RUN make vendor
WORKDIR /w
COPY go.mod go.sum /w/
RUN go mod download

# Build goldpinger

Expand All @@ -19,6 +18,6 @@ RUN make bin/goldpinger
# Build the asset container, copy over goldpinger

FROM scratch
COPY --from=builder /go/src/github.com/bloomberg/goldpinger/bin/goldpinger /goldpinger
COPY --from=builder /w/bin/goldpinger /goldpinger
COPY ./static /static
ENTRYPOINT ["/goldpinger", "--static-file-path", "/static"]
ENTRYPOINT ["/goldpinger", "--static-file-path", "/static"]
Loading

0 comments on commit c66050e

Please sign in to comment.