File tree 2 files changed +16
-7
lines changed
2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,20 @@ jobs:
25
25
circleci step halt
26
26
fi
27
27
- run : make image
28
- - run : echo "$GCR_JSON_KEY " | docker login -u _json_key --password-stdin us.gcr.io
28
+ - run : echo "$DOCKER_PASSWORD " | docker login -u "$DOCKER_USERNAME" --password-stdin
29
29
- run :
30
- name : Push image to GCR
30
+ name : Push image to Dockerhub
31
31
command : |
32
- docker tag $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \
33
- us.gcr.io/code-climate/codeclimate-eslint:b$CIRCLE_BUILD_NUM
34
- docker push us.gcr.io/code-climate/codeclimate-eslint:b$CIRCLE_BUILD_NUM
32
+ make release RELEASE_TAG="b$CIRCLE_BUILD_NUM"
33
+ make release RELEASE_TAG="$(echo $CIRCLE_BRANCH | grep -oP 'channel/\K[\w\-]+')"
35
34
36
35
workflows :
37
36
version : 2
38
37
build_deploy :
39
38
jobs :
40
39
- test
41
40
- release_images :
41
+ context : Quality
42
42
requires :
43
43
- test
44
44
filters :
@@ -47,4 +47,4 @@ workflows:
47
47
48
48
notify :
49
49
webhooks :
50
- - url : https://cc-slack-proxy.herokuapp.com/circle
50
+ - url : https://cc-slack-proxy.herokuapp.com/circle
Original file line number Diff line number Diff line change 1
- .PHONY : image test test.unit test.integration test.system citest.base citest integration yarn.lock yarn.add
1
+ .PHONY : image test test.unit test.integration test.system citest.base citest integration yarn.lock yarn.add release
2
2
3
3
IMAGE_NAME ?= codeclimate/codeclimate-eslint
4
+ RELEASE_REGISTRY ?= codeclimate
5
+
6
+ ifndef RELEASE_TAG
7
+ override RELEASE_TAG = latest
8
+ endif
4
9
5
10
NPM_TEST_TARGET ?= test
6
11
NPM_INTEGRATION_TARGET ?= integration
@@ -48,3 +53,7 @@ yarn.lock: package.json Dockerfile
48
53
$(MAKE ) image
49
54
./bin/yarn install
50
55
touch yarn.lock
56
+
57
+ release :
58
+ docker tag $(IMAGE_NAME ) $(RELEASE_REGISTRY ) /codeclimate-eslint:$(RELEASE_TAG )
59
+ docker push $(RELEASE_REGISTRY ) /codeclimate-eslint:$(RELEASE_TAG )
You can’t perform that action at this time.
0 commit comments