Skip to content

Commit

Permalink
Move to circle 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesperandio committed Jan 15, 2021
1 parent 5455b68 commit 555c1f0
Showing 2 changed files with 49 additions and 36 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: 2

jobs:
test:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-pmd
steps:
- checkout
- run: make image
- run: make test

release_images:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-pmd
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 $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \
us.gcr.io/code-climate/codeclimate-pmd:b$CIRCLE_BUILD_NUM
docker push us.gcr.io/code-climate/codeclimate-pmd:b$CIRCLE_BUILD_NUM
workflows:
version: 2
build_deploy:
jobs:
- test
- release_images:
requires:
- test
filters:
branches:
only: /master|channel\/[\w-]+/
notify:
webhooks:
- url: https://cc-slack-proxy.herokuapp.com/circle
36 changes: 0 additions & 36 deletions circle.yml

This file was deleted.

0 comments on commit 555c1f0

Please sign in to comment.