Skip to content

Commit

Permalink
Add missing release job to circleci (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
f-moya authored May 20, 2020
1 parent 73b7643 commit 776f887
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,42 @@ jobs:
- run:
name: Test
command: make test

release_images:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-sonar-java
steps:
- checkout
- run:
name: Validate owner
command: |
if [ "$CIRCLE_PROJECT_USERNAME" -ne "codeclimate" ]
then
echo "Skipping release for non-codeclimate branches"
circleci step halt
fi
- run: make image
- run: echo "$GCR_JSON_KEY" | docker login -u _json_key --password-stdin us.gcr.io
- run:
name: Push image to GCR
command: |
docker tag codeclimate/codeclimate-sonar-java \
us.gcr.io/code-climate/codeclimate-sonar-java:b$CIRCLE_BUILD_NUM
docker push us.gcr.io/code-climate/codeclimate-sonar-java:b$CIRCLE_BUILD_NUM
workflows:
version: 2
build_deploy:
jobs:
- build
- release_images:
requires:
- build
filters:
branches:
only: /master|channel\/[\w-]+/

notify:
webhooks:
- url: https://cc-slack-proxy.herokuapp.com/circle

0 comments on commit 776f887

Please sign in to comment.