Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable shipkit release publishing #1239

Merged
merged 7 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: java
dist: trusty
script:
- ./gradlew build codeCoverageReport
sudo: required
jdk:
- oraclejdk8
Expand All @@ -17,5 +15,15 @@ addons:
packages:
- oracle-java8-installer
- oracle-java8-unlimited-jce-policy
jobs:
include:
- stage: test
script: "./gradlew -s --scan build codeCoverageReport"
- stage: deploy
script: "./gradlew -s build && ./gradlew ciPerformRelease"
stages:
- name: test
- name: deploy
cgtz marked this conversation as resolved.
Show resolved Hide resolved
if: branch = master AND type = push
after_success:
- bash <(curl -s https://codecov.io/bash)
18 changes: 17 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ buildscript {
apply from: file('gradle/buildscript.gradle'), to: buildscript
}

plugins {
id 'org.shipkit.java' version '2.2.5'
}

apply from: file('gradle/license.gradle')
apply from: file('gradle/environment.gradle')
apply from: file("gradle/dependency-versions.gradle")
Expand Down Expand Up @@ -105,6 +109,13 @@ subprojects {
artifacts {
archives testJar
}

javadoc {
// TODO audit and fix our javadocs so that we don't need this setting
cgtz marked this conversation as resolved.
Show resolved Hide resolved
// This is mainly for cases where param/throws tags don't have descriptions
// Previously, javadocs weren't being compiled, but now shipkit automatically enables this build step
failOnError = false
}
}

project(':ambry-utils') {
Expand Down Expand Up @@ -416,6 +427,11 @@ task codeCoverageReport(type: JacocoReport) {
csv.enabled true
}
}

codeCoverageReport.dependsOn subprojects*.allTest

if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied.
#
version=0.1.0
org.gradle.daemon=true
org.gradle.configureondemand=true
41 changes: 41 additions & 0 deletions gradle/shipkit.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (C) 2019 LinkedIn Corp. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied.

// Configuration for automatically publishing to bintray
// Reference: https://github.com/mockito/shipkit/blob/master/docs/getting-started.md
shipkit {
gitHub.repository = "linkedin/ambry"

//Reference: https://github.com/mockito/shipkit/blob/master/docs/getting-started.md#production-configuration
// This is okay to check in since it only grants read access via API to public github repos
gitHub.readOnlyAuthToken = "9ad754b8745e20d90734ff7be8889c93a3bca81e"

//Reference: https://github.com/mockito/shipkit/blob/master/docs/getting-started.md#write-token
gitHub.writeAuthToken = System.getenv("GH_WRITE_TOKEN")
}

allprojects {
plugins.withId("org.shipkit.bintray") {
//Bintray configuration is handled by JFrog Bintray Gradle Plugin
//For reference see the official documentation: https://github.com/bintray/gradle-bintray-plugin
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_API_KEY")

pkg {
repo = 'maven'
userOrg = 'linkedin'
name = 'ambry'
licenses = ['Apache-2.0']
labels = ['blob storage']
}
}
}
}
3 changes: 3 additions & 0 deletions version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Version of the produced binaries. This file is intended to be checked-in.
#It will be automatically bumped by release automation.
version=0.3.0