forked from cloudnative/teamcity-webhooks
-
Notifications
You must be signed in to change notification settings - Fork 4
/
circle.yml
41 lines (36 loc) · 1.22 KB
/
circle.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
---
# https://circleci.com/docs/configuration
machine:
java:
version: oraclejdk6
dependencies:
cache_directories:
- ~/.m2
override:
- git checkout -f
- git clean -df
- mvn clean package release:clean # So that release plugin gets cached
test:
override:
- sleep 0
general:
artifacts:
- target/webhooks.zip
deployment:
bintray:
branch: release
# Release is performed on "master" branch to avoid pushes of updated POM
# to "release" which triggers yet another release build.
# "release" content is ignored, pushing to this branch only serves as a release trigger
commands:
- git config user.email "evgenyg@gmail.com"
- git config user.name "CircleCI"
- git checkout -f
- git clean -df
- git tag | xargs git tag -d
- git fetch origin
- git checkout master
- git reset --hard origin/master
- mvn --batch-mode clean release:prepare
# https://bintray.com/docs/api/#_upload_content
- curl --user "cloudnative:$BINTRAY_API_KEY" --upload-file 'target/webhooks.zip' "https://api.bintray.com/content/cloudnative/teamcity/teamcity-webhooks/$(git tag|tail -1)/teamcity-webhooks/$(git tag|tail -1)/webhooks.zip?publish=1"