forked from linkedin/li-apache-kafka-clients
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to circleci 2.0, bump gradle, implement lib caching (linkedin#53)
- Loading branch information
1 parent
b11fd83
commit be33bfe
Showing
7 changed files
with
84 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
version: 2 | ||
|
||
jobs: | ||
|
||
build: | ||
working_directory: ~/workspace | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "build.gradle" }} | ||
- run: | ||
command: ./gradlew resolveDependencies | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "build.gradle" }} | ||
paths: | ||
- ~/.gradle/caches | ||
- ~/.gradle/wrapper | ||
- run: | ||
command: ./gradlew clean build | ||
- run: | ||
command: mkdir ~/test-results | ||
- run: | ||
command: find ~/workspace -type f -regex ".*/test-results/.*xml" -exec ln {} ~/test-results/ \; | ||
- store_test_results: | ||
path: ~/test-results | ||
- store_artifacts: | ||
path: ~/test-results | ||
- store_artifacts: | ||
path: build/libs | ||
|
||
publish: | ||
working_directory: ~/workspace | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "build.gradle" }} | ||
- run: | ||
command: ./gradlew assemble testJar | ||
- run: | ||
command: ./.circleci/publishOnCommitMsg.sh | ||
|
||
workflows: | ||
version: 2 | ||
build-and-publish: | ||
jobs: | ||
- build | ||
- publish: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
if git log -1 --pretty=%B | grep "^RELEASE.*"; | ||
then | ||
echo "Publishing a release" | ||
./gradlew distributeBuild | ||
else | ||
echo "Not a release" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Feb 14 15:08:09 PST 2017 | ||
#Wed Jul 19 11:36:50 PDT 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
/* | ||
* Copyright 2017 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License"). See License in the project root for license information. | ||
*/ | ||
|
||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
maven { url 'https://dl.bintray.com/ethankhall/crom/' } | ||
maven { url 'https://dl.bintray.com/ethankhall/gradle-plugins/' } | ||
} | ||
} |