Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 97e86b7

Browse files
committed
Improve build process, run tests via docker
1 parent 6774acc commit 97e86b7

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git
2+
Makefile

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.PHONY: test
2+
3+
image:
4+
docker build -t codeclimate/codeclimate-csslint .
5+
6+
test: image
7+
docker run --rm codeclimate/codeclimate-csslint rake

circle.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,21 @@ machine:
77
CODECLIMATE_DOCKER_REGISTRY_USERNAME: circleci
88
CODECLIMATE_DOCKER_REGISTRY_EMAIL: ops@codeclimate.com
99

10-
dependencies:
11-
override:
12-
- echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
13-
- curl https://sdk.cloud.google.com | bash
14-
- bundle install
15-
- npm install -g codeclimate/csslint.git#7a3a6be
16-
1710
test:
1811
override:
19-
- bundle exec rspec spec
20-
- docker build -t=$registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .
12+
- make test
2113

2214
deployment:
2315
registry:
2416
branch: master
2517
commands:
18+
# GCR for .com
19+
- echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
20+
- docker tag codeclimate/codeclimate-csslint $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
2621
- gcloud auth activate-service-account --key-file /tmp/gcloud_key.json
27-
- gcloud docker -a
28-
- docker push $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
22+
- gcloud docker push $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
23+
24+
# registry.codeclimate.net for CC:E
2925
- docker login --username=$CODECLIMATE_DOCKER_REGISTRY_USERNAME --password=$CODECLIMATE_DOCKER_REGISTRY_PASSWORD --email=$CODECLIMATE_DOCKER_REGISTRY_EMAIL $CODECLIMATE_DOCKER_REGISTRY_HOSTNAME
3026
- docker tag $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM $CODECLIMATE_DOCKER_REGISTRY_HOSTNAME/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM
3127
- docker push $CODECLIMATE_DOCKER_REGISTRY_HOSTNAME/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM

0 commit comments

Comments
 (0)