Skip to content

Commit

Permalink
Merge pull request #52 from codeclimate/will/cleanup
Browse files Browse the repository at this point in the history
Build cleanup
  • Loading branch information
wfleming committed Feb 16, 2016
2 parents 8f1dc04 + 70e4fd5 commit cc0acc3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.bundle
.git
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ USER app
RUN cd /usr/src/app && \
rake docs:scrape

VOLUME /code
WORKDIR /code

CMD ["/usr/src/app/bin/codeclimate-rubocop"]
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.PHONY: image test

IMAGE_NAME ?= codeclimate/codeclimate-rubocop

image:
docker build --rm -t $(IMAGE_NAME) .

test: image
docker run --rm $(IMAGE_NAME) sh -c "cd /usr/src/app && bundle exec rake"
2 changes: 1 addition & 1 deletion bin/codeclimate-rubocop
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ else
engine_config = {}
end

CC::Engine::Rubocop.new("/code", engine_config, STDOUT).run
CC::Engine::Rubocop.new(Dir.pwd, engine_config, STDOUT).run
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ machine:

dependencies:
override:
- docker build -t=$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .
- echo "no-op"

test:
override:
- docker run $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM bundle exec rake
- IMAGE_NAME="$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM" make test

deployment:
registry:
Expand Down

0 comments on commit cc0acc3

Please sign in to comment.