Skip to content

Commit

Permalink
Move cover to build image (#2871)
Browse files Browse the repository at this point in the history
* Add cover tool to build-image.

Signed-off-by: Peter Štibraný <[email protected]>

* Update build image.

Signed-off-by: Peter Štibraný <[email protected]>
  • Loading branch information
pstibrany authored Jul 14, 2020
1 parent a8fd33b commit 2fd47bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defaults: &defaults
docker:
# IMPORTANT: whenever you change the build-image version tag, remember to replace it
# across the entire file (there are multiple references).
- image: quay.io/cortexproject/build-image:update-build-image-ce3bc5f86
- image: quay.io/cortexproject/build-image:with-cover-32d2cb52b
working_directory: /go/src/github.com/cortexproject/cortex

filters: &filters
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

test:
docker:
- image: quay.io/cortexproject/build-image:update-build-image-ce3bc5f86
- image: quay.io/cortexproject/build-image:with-cover-32d2cb52b
- image: cassandra:3.11
environment:
JVM_OPTS: "-Xms1024M -Xmx1024M"
Expand All @@ -111,7 +111,7 @@ jobs:
name: Integration Test
command: |
touch build-image/.uptodate
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IMAGE=quay.io/cortexproject/build-image:update-build-image-ce3bc5f86 configs-integration-test
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IMAGE=quay.io/cortexproject/build-image:with-cover-32d2cb52b configs-integration-test
integration:
machine:
Expand Down
3 changes: 2 additions & 1 deletion build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ RUN GO111MODULE=on go get -tags netgo \
github.com/client9/misspell/cmd/[email protected] \
github.com/golang/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] && \
github.com/gogo/protobuf/[email protected] \
github.com/weaveworks/tools/cover@bdd647e92546027e12cdde3ae0714bb495e43013 && \
rm -rf /go/pkg /go/src

ENV KUBEVAL_VERSION=0.15.0
Expand Down
3 changes: 0 additions & 3 deletions tools/test
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ if [ -n "$PARALLEL" ]; then
fi

if [ -n "$SLOW" ] && [ -z "$COVERDIR" ]; then
go get github.com/weaveworks/tools/cover
go mod vendor # re-vendor everything

cover "$coverdir"/* >profile.cov
rm -rf "$coverdir"
go tool cover -html=profile.cov -o=coverage.html
Expand Down

0 comments on commit 2fd47bb

Please sign in to comment.