Skip to content

Commit

Permalink
Revert 6432dde: Migrate to new Shipkit plugin (#44)
Browse files Browse the repository at this point in the history
* Revert 6432dde: Migrate to new Shipkit plugin

* Update GitHub read-only authentication token
  • Loading branch information
wmoustafa authored Feb 6, 2021
1 parent 1b5be21 commit fb20e88
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 176 deletions.
14 changes: 3 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,9 @@ branches:

#Build and perform release (if needed)
script:

# 1. Print output every minute to avoid travis timeout
# Print output every minute to avoid travis timeout
- while sleep 1m; do echo "=====[ $SECONDS seconds elapsed -- still running ]====="; done &

# 2. To validate changes, we run building and bintray upload in dry run. This happens on every build, even PRs.
# To publish, we perform github release and perform bintray upload (no dry run). This only for main branch builds.
- >
./gradlew build bintrayUpload --s -PbintrayDryRun
&& if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ];
then ./gradlew githubRelease bintrayUpload --s; fi
# 3. Killing background sleep loop
- ./gradlew build -s && ./gradlew ciPerformRelease -s
# Killing background sleep loop
- kill %1

17 changes: 1 addition & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@
// Licensed under the BSD-2 Clause license.
// See LICENSE in the project root for license information.

buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath "org.shipkit:shipkit-auto-version:1.1.1"
classpath "org.shipkit:shipkit-changelog:1.1.1"
}
}

plugins {
id "com.diffplug.spotless" version "5.8.2"
id 'com.github.johnrengelman.shadow' version '5.2.0'
id "org.shipkit.java" version "2.3.4"
}

apply from: "gradle/shipkit.gradle"

configurations {
provided
}
Expand Down
2 changes: 1 addition & 1 deletion coral-hive/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply from: "$rootDir/gradle/java-publication.gradle"
apply plugin: 'java'
apply plugin: 'antlr'

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion coral-pig/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply from: "$rootDir/gradle/java-publication.gradle"
apply plugin: 'java'
apply plugin: 'maven-publish'

dependencies {
compile deps.'javax-annotation'
Expand Down
2 changes: 1 addition & 1 deletion coral-presto/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply from: "$rootDir/gradle/java-publication.gradle"
apply plugin: 'java'

dependencies {
compile deps.'gson'
Expand Down
3 changes: 2 additions & 1 deletion coral-schema/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply from: "$rootDir/gradle/java-publication.gradle"
apply plugin: 'java'
apply plugin: 'maven-publish'

dependencies {
compile deps.'slf4j-api'
Expand Down
3 changes: 2 additions & 1 deletion coral-spark-plan/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply from: "$rootDir/gradle/java-publication.gradle"
apply plugin:'java'
apply plugin: 'maven-publish'

dependencies {
compile deps.'gson'
Expand Down
3 changes: 2 additions & 1 deletion coral-spark/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply from: "$rootDir/gradle/java-publication.gradle"
apply plugin: 'java'
apply plugin: 'maven-publish'

dependencies {
compile deps.'gson'
Expand Down
126 changes: 0 additions & 126 deletions gradle/java-publication.gradle

This file was deleted.

60 changes: 46 additions & 14 deletions gradle/shipkit.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,50 @@
apply plugin: "org.shipkit.shipkit-auto-version"
apply plugin: "org.shipkit.shipkit-changelog"
apply plugin: "org.shipkit.shipkit-github-release"
shipkit {
gitHub.repository = "linkedin/coral"

tasks.named("generateChangelog") {
previousRevision = project.ext.'shipkit-auto-version.previous-tag'
githubToken = System.getenv("GH_WRITE_TOKEN")
repository = "linkedin/coral"
gitHub.readOnlyAuthToken = "967ad570c37790a939" + "366590ca3035ed56b8d2ae"

// The GitHub write token is required for committing release notes and bumping up project version
// Ensure that the release machine or Travis CI has this env variable exported
gitHub.writeAuthToken = System.getenv("GH_WRITE_TOKEN")

git.releasableBranchRegex = "master|release/.+"

team.developers = [
'wmoustafa:Walaa Eldin Moustafa',
'khaitranq:Khai Tranh',
'funcheetah:Wenye Zhang',
'shardulm94:Shardul Mahadik',
'hotsushi:Sushant Raikar'
]
}

tasks.named("githubRelease") {
def genTask = tasks.named("generateChangelog").get()
dependsOn genTask
repository = genTask.repository
changelog = genTask.outputFile
githubToken = System.getenv("GH_WRITE_TOKEN")
newTagRevision = System.getenv("TRAVIS_COMMIT")
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 {
// The Bintray API token is required to publish artifacts to Bintray
// Ensure that the release machine or Travis CI has this env variable exported
key = System.getenv("BINTRAY_API_KEY")
pkg {
repo = 'maven'
user = 'lnkd-apa'
userOrg = 'linkedin'
name = 'coral'
licenses = ['BSD 2-Clause']
labels = [
'coral',
'sql',
'presto',
'spark',
'hive',
'views'
]
vcsUrl = "https://github.com/linkedin/coral.git"
description = "A library for analyzing, processing, and rewriting views defined in the Hive Metastore, and sharing them across multiple execution engines"
}
publish = true
}
}
}
7 changes: 4 additions & 3 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Version of the produced binaries.
# The version is inferred by shipkit-auto-version Gradle plugin (https://github.com/shipkit/shipkit-auto-version)
version=1.0.*
#Version of the produced binaries. This file is intended to be checked-in.
#It will be automatically bumped by release automation.
version=1.0.19
previousVersion=1.0.18

0 comments on commit fb20e88

Please sign in to comment.