Skip to content

Commit d51e400

Browse files
committed
Move build script to Makefile, update circle
The build started failing recently. Not sure why. We don't have any actual tests on this repo, we just build the image and make sure that doesn't fail. We can do that via a makefile, to be more consistent with our other engine repos. Made a few small tweaks to the Dockerfile to get the build compatible with Circle's version of Docker. Seems like we can't copy a file into a dir without including a trailing slash or the full path of the target file, or it turns the dir into a file. Discussed a bit here: https://discuss.circleci.com/t/failed-docker-build-at-a-copy-step-in-dockerfile/5440/4
1 parent 20219a5 commit d51e400

File tree

4 files changed

+14
-21
lines changed

4 files changed

+14
-21
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ FROM alpine:3.4
33
MAINTAINER Code Climate <hello@codeclimate.com>
44

55
WORKDIR /usr/src/app
6-
COPY codeclimate-golint.go /usr/src/app
6+
COPY codeclimate-golint.go /usr/src/app/codeclimate-golint.go
77

88
RUN apk --update add go git && \
99
export GOPATH=/tmp/go GOBIN=/usr/local/bin && \
1010
go get -d . && \
1111
go install codeclimate-golint.go && \
1212
apk del go git && \
13-
rm -rf "$GOPATH" rm /var/cache/apk/*
13+
rm -rf "$GOPATH" && \
14+
rm /var/cache/apk/*
1415

1516
WORKDIR /code
1617
VOLUME /code

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.PHONY: image
2+
3+
IMAGE_NAME ?= codeclimate/codeclimate-golint
4+
5+
image:
6+
docker build --rm -t $(IMAGE_NAME) .

bin/build

Lines changed: 0 additions & 18 deletions
This file was deleted.

circle.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ machine:
55
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
66
PRIVATE_REGISTRY: us.gcr.io/code_climate
77

8+
dependencies:
9+
override:
10+
- echo "Not applicable"
11+
812
test:
913
override:
10-
- ./bin/build $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
14+
- make image
1115

1216
deployment:
1317
registry:

0 commit comments

Comments
 (0)