Skip to content

Commit

Permalink
feat(ci): Use build-go dedicated image to build go
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton committed Dec 20, 2019
1 parent e229088 commit 0d5dcd7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .buildkite/pipeline.yml
Expand Up @@ -85,7 +85,7 @@ steps:
key: go-build
plugins:
- n0izn0iz/docker#v3.5.4:
image: bertytech/bazel:2.0.0-buster-r0
image: bertytech/build-go:v2
propagate-uid-gid: true
workdir: /go/src/berty.tech
environment:
Expand All @@ -94,6 +94,7 @@ steps:
"GOPATH=/home/buildkite-agent/go",
"HOME=/home/buildkite-agent",
"GOSUMDB=off",
"CODECOV_TOKEN",
]
volumes: ["~:/home/buildkite-agent"]
commands:
Expand All @@ -119,7 +120,7 @@ steps:
- rm -f /tmp/golangci-lint.lock
- make lint
- cd ..
- codecov -f ./go/coverage.txt
- codecov -t "$CODECOV_TOKEN" -f ./go/coverage.txt

- label: bazel-go
plugins:
Expand Down
2 changes: 0 additions & 2 deletions go/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tool/docker-build-go/Dockerfile
@@ -0,0 +1,5 @@
FROM golang:1.13.5-buster

RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.21.0

RUN curl -s https://codecov.io/bash > /bin/codecov && chmod +x /bin/codecov
10 changes: 10 additions & 0 deletions tool/docker-build-go/Makefile
@@ -0,0 +1,10 @@
IMAGE ?= bertytech/build-go
VERSION ?= v2

build:
docker build -t $(IMAGE):$(VERSION) .

publish: build
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
docker push $(IMAGE):$(VERSION)
docker push $(IMAGE):latest

0 comments on commit 0d5dcd7

Please sign in to comment.