Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.PHONY: image test
.PHONY: image test citest

IMAGE_NAME ?= codeclimate/codeclimate-duplication

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

test: image
docker run --tty --interactive --rm $(IMAGE_NAME) bundle exec rake

citest:
docker run --rm $(IMAGE_NAME) bundle exec rake
29 changes: 17 additions & 12 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
machine:
services:
- docker
environment:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
PRIVATE_REGISTRY: us.gcr.io/code_climate

dependencies:
override:
- docker info
- docker build -t=$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .
- >
docker run
--env CIRCLE_BRANCH
--env CIRCLE_PROJECT_REPONAME
--env CIRCLE_TOKEN
--env GCR_JSON_KEY
--volume /var/run/docker.sock:/var/run/docker.sock
codeclimate/patrick pull || true
- make image

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

deployment:
registry:
branch: master
owner: codeclimate
commands:
- echo $GCLOUD_JSON_KEY_BASE64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
- curl https://sdk.cloud.google.com | bash
- gcloud auth activate-service-account --key-file /tmp/gcloud_key.json
- gcloud docker -a
- docker push $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
- >
docker run
--env CIRCLE_BUILD_NUM
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad indentation fixed with a07f3c7

--env CIRCLE_PROJECT_REPONAME
--env GCR_JSON_KEY
--volume /var/run/docker.sock:/var/run/docker.sock
codeclimate/patrick push gcr
notify:
webhooks:
Expand Down