Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 17f0ceb

Browse files
committed
Merge pull request #110 from codeclimate/devon/enable-patrick
Update CircleCI config with patrick and GCR json key
2 parents fdc5757 + 00b20a0 commit 17f0ceb

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

‎Makefile‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
.PHONY: image test
1+
.PHONY: image test citest
22

33
IMAGE_NAME ?= codeclimate/codeclimate-duplication
44

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

88
test: image
9+
docker run --tty --interactive --rm $(IMAGE_NAME) bundle exec rake
10+
11+
citest:
912
docker run --rm $(IMAGE_NAME) bundle exec rake

‎circle.yml‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
machine:
22
services:
33
- docker
4-
environment:
5-
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
6-
PRIVATE_REGISTRY: us.gcr.io/code_climate
74

85
dependencies:
96
override:
10-
- docker info
11-
- docker build -t=$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .
7+
- >
8+
docker run
9+
--env CIRCLE_BRANCH
10+
--env CIRCLE_PROJECT_REPONAME
11+
--env CIRCLE_TOKEN
12+
--env GCR_JSON_KEY
13+
--volume /var/run/docker.sock:/var/run/docker.sock
14+
codeclimate/patrick pull || true
15+
- make image
1216

1317
test:
1418
override:
15-
- docker run $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM bundle exec rake
19+
- make citest
1620

1721
deployment:
1822
registry:
1923
branch: master
20-
owner: codeclimate
2124
commands:
22-
- echo $GCLOUD_JSON_KEY_BASE64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
23-
- curl https://sdk.cloud.google.com | bash
24-
- gcloud auth activate-service-account --key-file /tmp/gcloud_key.json
25-
- gcloud docker -a
26-
- docker push $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
25+
- >
26+
docker run
27+
--env CIRCLE_BUILD_NUM
28+
--env CIRCLE_PROJECT_REPONAME
29+
--env GCR_JSON_KEY
30+
--volume /var/run/docker.sock:/var/run/docker.sock
31+
codeclimate/patrick push gcr
2732
2833
notify:
2934
webhooks:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /