-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathconfig.yml
50 lines (46 loc) · 1.24 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: 2
jobs:
test:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-eslint
steps:
- checkout
- run: make image
- run: make citest
release_images:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-eslint
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 "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- run:
name: Push image to Dockerhub
command: |
make release RELEASE_TAG="b$CIRCLE_BUILD_NUM"
make release RELEASE_TAG="$(echo $CIRCLE_BRANCH | grep -oP 'channel/\K[\w\-]+')"
workflows:
version: 2
build_deploy:
jobs:
- test
- release_images:
context: Quality
requires:
- test
filters:
branches:
only: /master|channel\/[\w-]+/
notify:
webhooks:
- url: https://cc-slack-proxy.herokuapp.com/circle