Skip to content

Commit cc0acc3

Browse files
committed
Merge pull request #52 from codeclimate/will/cleanup
Build cleanup
2 parents 8f1dc04 + 70e4fd5 commit cc0acc3

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.bundle
2+
.git

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ USER app
1717
RUN cd /usr/src/app && \
1818
rake docs:scrape
1919

20+
VOLUME /code
21+
WORKDIR /code
22+
2023
CMD ["/usr/src/app/bin/codeclimate-rubocop"]

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.PHONY: image test
2+
3+
IMAGE_NAME ?= codeclimate/codeclimate-rubocop
4+
5+
image:
6+
docker build --rm -t $(IMAGE_NAME) .
7+
8+
test: image
9+
docker run --rm $(IMAGE_NAME) sh -c "cd /usr/src/app && bundle exec rake"

bin/codeclimate-rubocop

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ else
1111
engine_config = {}
1212
end
1313

14-
CC::Engine::Rubocop.new("/code", engine_config, STDOUT).run
14+
CC::Engine::Rubocop.new(Dir.pwd, engine_config, STDOUT).run

circle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ machine:
1010

1111
dependencies:
1212
override:
13-
- docker build -t=$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .
13+
- echo "no-op"
1414

1515
test:
1616
override:
17-
- docker run $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM bundle exec rake
17+
- IMAGE_NAME="$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM" make test
1818

1919
deployment:
2020
registry:

0 commit comments

Comments
 (0)