Skip to content

Commit

Permalink
[LI-HOTFIX] Bintray related commits This is a combination of 5 commits.
Browse files Browse the repository at this point in the history
TICKET =
LI_DESCRIPTION =

[LI-HOTFIX] Add build changes to publish github LinkedIn Kafka artifacts to bintray (#1)
TICKET =
LI_DESCRIPTION =

[NOTE] This is a temporary measure to publish artifacts until CI is properly set up to do the job automatically. Users are not expected to run this themselves.

EXIT_CRITERIA = MANUAL ["describe exit criteria"]

[LI-HOTFIX] Add changes for CI builds and publishing artifacts to bintray. (#2)
TICKET =
LI_DESCRIPTION =

Travis will kick off a build and publish artifacts to bintray upon creating a tag in the "x.y.z.w" format.

EXIT_CRITERIA = MANUAL ["describe exit criteria"]

[LI-HOTFIX] Try different encrypted bintray-related env variables for Travis (apache#4)
TICKET =
LI_DESCRIPTION =

Travis couldn't access one of the initially encrypted variables for some reason.

EXIT_CRITERIA = MANUAL ["describe exit criteria"]

[LI-HOTFIX] Set Bintray-related env variables via repository setting instead of in .travis.yml (apache#5)
TICKET =
LI_DESCRIPTION =

EXIT_CRITERIA = MANUAL ["describe exit criteria"]

[LI-HOTFIX] Use the maven repo under the LinkedIn Bintray account to publish artifacts (apache#25)
TICKET =
LI_DESCRIPTION =

EXIT_CRITERIA = MANUAL ["describe exit criteria"]

EXIT_CRITERIA = MANUAL ["describe exit criteria"]
# EXIT_CRITERIA = <EXIT_CRITERIA> <PARAMETERS>
# e.g.,
# when the specified hash(s) is presented in the history, this commit is no longer needed:
# EXIT_CRITERIA = HASH [<hash1>, <hash2> ...]
# When the specified tickets are closed and there are patches with these tickets in the title in the commit history, this commit is no longer needed:
# EXIT_CRITERIA = TICKET [<ticket1>, <ticket2> ...]
# The exit criteria for this commit requires manual investigation:
# EXIT_CRITERIA = MANUAL [<description>]
  • Loading branch information
jonlee2 authored and xiowu0 committed Jul 10, 2019
1 parent 24624e6 commit 86baadf
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 40 deletions.
43 changes: 20 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,38 @@ sudo: required
dist: trusty
language: java

env:
- _DUCKTAPE_OPTIONS="--subset 0 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 1 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 2 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 3 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 4 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 5 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 6 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 7 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 8 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 9 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 10 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 11 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 12 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 13 --subsets 15"
- _DUCKTAPE_OPTIONS="--subset 14 --subsets 15"

jdk:
- oraclejdk8

before_install:
- gradle wrapper

script:
- ./gradlew rat
- ./gradlew systemTestLibs && /bin/bash ./tests/docker/run_tests.sh
# By default, the install step will run ./gradlew assemble, which actually builds. Skip this step and do the actual
# build during the build step.
install: true

services:
- docker
# Excluded integration tests for now because Travis will hit build timeout (50 minutes) when including them.
# Also excluded streams unitTest because they often fail with "pure virtual method called" error (KAFKA-3502).
# TODO: re-enable these tests when the mentioned issues are resolved.
script:
- ./gradlew clean compileJava compileScala compileTestJava compileTestScala checkstyleMain checkstyleTest findbugsMain unitTest -x :streams:unitTest rat --no-daemon -PxmlFindBugsReport=true -PtestLoggingEvents=started,passed,skipped,failed

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"

# This will triger publishing artifacts to bintray upon the creation of a new tag in the "x.y.z.w" format.
deploy:
provider: script
script: ./gradlew -Pversion=$TRAVIS_TAG uploadArchivesAll
skip_cleanup: true
on:
tags: true
all_branches: true
condition: $TRAVIS_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,20 @@ build directory (`${project_dir}/bin`) clashes with Kafka's scripts directory an
to avoid known issues with this configuration.

### Publishing the jar for all version of Scala and for all projects to maven ###
./gradlew uploadArchivesAll
./gradlew -Pversion=<release version> uploadArchivesAll

Please note for this to work you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`) and assign the following variables
By default, this command will publish artifacts to a Bintray repository named "kafka" under an account specified by the BINTRAY_USER environment variable. The BINTRAY_KEY
environment variable is used for the password for that account.

If you want to override this to use a different maven repository, you should create/update `${GRADLE_USER_HOME}/gradle.properties` (typically, `~/.gradle/gradle.properties`)
and assign the following variables

mavenUrl=
mavenUsername=
mavenPassword=

Signing is disabled by default. If you need signing, please set the following variables in `gradle.properties` as well:

signing.keyId=
signing.password=
signing.secretKeyRingFile=
Expand Down
24 changes: 14 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ allprojects {
repositories {
mavenCentral()
}

apply plugin: 'idea'
apply plugin: 'org.owasp.dependencycheck'
apply plugin: 'com.github.ben-manes.versions'
Expand Down Expand Up @@ -100,9 +100,14 @@ ext {
skipSigning = project.hasProperty('skipSigning') && skipSigning.toBoolean()
shouldSign = !skipSigning && !version.endsWith("SNAPSHOT") && project.gradle.startParameter.taskNames.any { it.contains("upload") }

mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : ''
mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : ''
mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : ''
bintrayUsername = System.getenv('BINTRAY_USER')
bintrayKey=System.getenv('BINTRAY_KEY')
bintrayUrl = bintrayApiBaseUrl + '/maven/linkedin/' + bintrayRepo + '/' + bintrayPackage + '/;publish=1'

// By default, publish to Bintray.
mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : bintrayUrl
mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : bintrayUsername
mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : bintrayKey

userShowStandardStreams = project.hasProperty("showStandardStreams") ? showStandardStreams : null

Expand Down Expand Up @@ -187,9 +192,9 @@ subprojects {
afterEvaluate {
pom.artifactId = "${archivesBaseName}"
pom.project {
name 'Apache Kafka'
name 'LinkedIn fork of Apache Kafka'
packaging 'jar'
url 'https://kafka.apache.org'
url 'http://github.com/linkedin/kafka'
licenses {
license {
name 'The Apache Software License, Version 2.0'
Expand Down Expand Up @@ -511,8 +516,8 @@ def fineTuneEclipseClasspathFile(eclipse, project) {
if (project.name.equals('core')) {
cp.entries.findAll { it.kind == "src" && it.path.equals("src/test/scala") }*.excludes = ["integration/", "other/", "unit/"]
}
/*
* Set all eclipse build output to go to 'build_eclipse' directory. This is to ensure that gradle and eclipse use different
/*
* Set all eclipse build output to go to 'build_eclipse' directory. This is to ensure that gradle and eclipse use different
* build output directories, and also avoid using the eclpise default of 'bin' which clashes with some of our script directories.
* https://discuss.gradle.org/t/eclipse-generated-files-should-be-put-in-the-same-place-as-the-gradle-generated-files/6986/2
*/
Expand Down Expand Up @@ -619,7 +624,6 @@ def pkgs = [
'log4j-appender',
'streams',
'streams:examples',
'streams:streams-scala',
'streams:test-utils',
'tools'
] + connectPkgs
Expand Down Expand Up @@ -702,7 +706,7 @@ project(':core') {
scoverage libs.scoveragePlugin
scoverage libs.scoverageRuntime
}

scoverage {
reportDir = file("${rootProject.buildDir}/scoverage")
highlighting = false
Expand Down
17 changes: 12 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

group=org.apache.kafka
# NOTE: When you change this version number, you should also make sure to update
# the version numbers in
group=com.linkedin.kafka

# NOTE: publishing artifacts requires a property named "version" to be set explicitly. For example,
# ./gradlew -Pversion=<version> uploadArchivesAll
#
# You should also make sure to update the version numbers in
# - docs/js/templateData.js
# - tests/kafkatest/__init__.py
# - tests/kafkatest/__init__.py,
# - tests/kafkatest/version.py (variable DEV_VERSION)
# - kafka-merge-pr.py
version=2.3.1-SNAPSHOT
scalaVersion=2.12.8
scalaVersion=2.11.12
task=build
org.gradle.jvmargs=-Xmx1024m -Xss2m
bintrayApiBaseUrl=https://api.bintray.com
bintrayRepo=maven
bintrayPackage=kafka
skipSigning=true

0 comments on commit 86baadf

Please sign in to comment.