File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,20 @@ jobs:
2525 circleci step halt
2626 fi
2727 - 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
2929 - run :
30- name : Push image to GCR
30+ name : Push image to Dockerhub
3131 command : |
32- docker tag $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \
33- us.gcr.io/code-climate/codeclimate-pmd:b$CIRCLE_BUILD_NUM
34- docker push us.gcr.io/code-climate/codeclimate-pmd: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\-]+')"
3534
3635workflows :
3736 version : 2
3837 build_deploy :
3938 jobs :
4039 - test
4140 - release_images :
41+ context : Quality
4242 requires :
4343 - test
4444 filters :
Original file line number Diff line number Diff line change 1- .PHONY : image test
1+ .PHONY : image test release
22
33IMAGE_NAME ?= codeclimate/codeclimate-pmd
4+ RELEASE_REGISTRY ?= codeclimate
5+
6+ ifndef RELEASE_TAG
7+ override RELEASE_TAG = latest
8+ endif
49
510image :
611 docker build --rm -t $(IMAGE_NAME ) .
@@ -13,3 +18,7 @@ upgrade:
1318 --workdir /usr/src/app \
1419 --volume $(PWD ) :/usr/src/app \
1520 $(IMAGE_NAME ) ./bin/upgrade.sh
21+
22+ release :
23+ docker tag $(IMAGE_NAME ) $(RELEASE_REGISTRY ) /codeclimate-pmd:$(RELEASE_TAG )
24+ docker push $(RELEASE_REGISTRY ) /codeclimate-pmd:$(RELEASE_TAG )
You can’t perform that action at this time.
0 commit comments