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 @@ -26,20 +26,20 @@ jobs:
2626 circleci step halt 
2727 fi 
2828run : make image 
29-  - run : echo "$GCR_JSON_KEY " | docker login -u _json_key  --password-stdin us.gcr.io  
29+  - run : echo "$DOCKER_PASSWORD " | docker login -u "$DOCKER_USERNAME"  --password-stdin 
3030 - run :
31-  name : Push image to GCR  
31+  name : Push image to Dockerhub  
3232 command : | 
33-  docker tag $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \ 
34-  us.gcr.io/code-climate/codeclimate-phpcodesniffer:b$CIRCLE_BUILD_NUM 
35-  docker push us.gcr.io/code-climate/codeclimate-phpcodesniffer:b$CIRCLE_BUILD_NUM 
33+  make release RELEASE_TAG="b$CIRCLE_BUILD_NUM" 
34+  make release RELEASE_TAG="$(echo $CIRCLE_BRANCH | grep -oP 'channel/\K[\w\-]+')" 
3635
3736workflows :
3837 version : 2 
3938 build_deploy :
4039 jobs :
4140 - build 
4241 - release_images :
42+  context : Quality 
4343 requires :
4444 - build 
4545 filters :
Original file line number Diff line number Diff line change 1- .PHONY : image
1+ .PHONY : image release 
22
33IMAGE_NAME  ?= codeclimate/codeclimate-phpcodesniffer
4+ RELEASE_REGISTRY  ?= codeclimate
5+ 
6+ ifndef  RELEASE_TAG 
7+ override  RELEASE_TAG  = latest
8+ endif 
49
510composer-update :
611docker run \ 
@@ -12,3 +17,7 @@ composer-update:
1217
1318image :
1419docker build --rm -t $(IMAGE_NAME )  . 
20+ 
21+ release :
22+ docker tag $(IMAGE_NAME )  $(RELEASE_REGISTRY ) /codeclimate-phpcodesniffer:$(RELEASE_TAG ) 
23+ docker push $(RELEASE_REGISTRY ) /codeclimate-phpcodesniffer:$(RELEASE_TAG ) 
                         You can’t perform that action at this time. 
           
                  
0 commit comments