Skip to content

Commit

Permalink
Remove all bintray code. (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
John Plaisted authored Mar 1, 2021
1 parent 296cf0e commit 3e9bd89
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 130 deletions.
6 changes: 3 additions & 3 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Publish Releases'
description: 'Runs gradle tasks to publish versions to Bintray and GitHub.'
description: 'Runs gradle tasks to publish versions to Artifactory and GitHub.'
outputs:
version:
description: "The version tag this created."
Expand All @@ -12,7 +12,7 @@ runs:
shell: bash
- run: echo Got version ${{ steps.get-tag.outputs.tag }}
shell: bash
- run: ./gradlew build publishToMavenLocal bintrayUploadAll artifactoryPublish -Pbintray.dryRun -Partifactory.dryRun
- run: ./gradlew build publishToMavenLocal artifactoryPublish -Partifactory.dryRun
shell: bash
- run: ./gradlew ciPerformRelease -Pbintray.dryRun # Stop publishing to bintray
- run: ./gradlew ciPerformRelease
shell: bash
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create GitHub & Bintray Release
name: Create GitHub & Artifactory Release
on:
push:
branches:
Expand All @@ -19,7 +19,5 @@ jobs:
uses: ./.github/actions/release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_KEY: ${{ secrets.ARTIFACTORY_KEY }}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# General Metadata Architecture

[![Version](https://img.shields.io/bintray/v/linkedin/maven/datahub-gma)](https://bintray.com/linkedin/maven/datahub-gma)
[![release](https://img.shields.io/github/v/release/linkedin/datahub-gma)](https://github.com/linkedin/datahub-gma/releases/)
[![build & test](https://github.com/linkedin/datahub-gma/workflows/build%20&%20test/badge.svg?branch=master&event=push)](https://github.com/linkedin/datahub-gma/actions?query=workflow%3A%22build+%26+test%22+branch%3Amaster+event%3Apush)
[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://join.slack.com/t/datahubspace/shared_invite/zt-dkzbxfck-dzNl96vBzB06pJpbRwP6RA)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/linkedin/datahub-gma/blob/master/docs/CONTRIBUTING.md)
Expand All @@ -12,6 +12,11 @@

---

> 📣 We've moved from Bintray to [Artifactory](https://linkedin.jfrog.io/artifactory/datahub-gma/)!
>
> As of version [0.2.45](https://github.com/linkedin/datahub-gma/releases/tag/v0.2.45), we are only publishing versions
> to LinkedIn's Artifactory instance rather than Bintray, which is approaching end of life.
## Introduction

General Metadata Architecture (GMA) is the backend for [DataHub](https://github.com/linkedin/datahub), LinkedIn's
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ buildscript {
classpath 'com.github.node-gradle:gradle-node-plugin:2.2.4'
classpath 'com.linkedin.pegasus:gradle-plugins:' + pegasusVersion
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.1.2.RELEASE'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4+"
classpath "org.shipkit:shipkit-auto-version:1.1.1"
classpath "org.shipkit:shipkit-changelog:1.1.1"
Expand Down
27 changes: 8 additions & 19 deletions gradle/ci-release.gradle
Original file line number Diff line number Diff line change
@@ -1,45 +1,34 @@
// CI done via ./github/workflows/gh-release.yml.

// Task to fail fast and clearly if required properties are not set.
task verifyBintrayProperties {
task verifyArtifactoryProperties {
doFirst {
if (!project.hasProperty('bintray.dryRun')) {
if (System.getenv('BINTRAY_USER') == null) {
throw new Exception("Environment variable BINTRAY_USER not set.");
if (!project.hasProperty('artifactory.dryRun')) {
if (System.getenv('ARTIFACTORY_USER') == null) {
throw new Exception("Environment variable ARTIFACTORY_USER not set.");
}
if (System.getenv('BINTRAY_KEY') == null) {
throw new Exception("Environment variable BINTRAY_USER not set.");
if (System.getenv('ARTIFACTORY_KEY') == null) {
throw new Exception("Environment variable ARTIFACTORY_KEY not set.");
}
}
}
}

task bintrayUploadAll {
description = "Runs 'bintrayUpload' tasks from all projects"
mustRunAfter "githubRelease" // github release is easier to rollback so we run it first
}

allprojects {
tasks.matching { it.name == "bintrayUpload" }.all {
it.dependsOn verifyBintrayProperties
bintrayUploadAll.dependsOn it
}
}

task artifactoryPublishAll {
description = "Runs 'artifactoryPublish' tasks from all projects"
mustRunAfter "githubRelease" // github release is easier to rollback so we run it first
}

allprojects {
tasks.matching { it.name == "artifactoryPublish" }.all {
it.dependsOn verifyArtifactoryProperties
artifactoryPublishAll.dependsOn it
}
}

task ciPerformRelease {
description = "Performs the release, intended to be ran on CI"
dependsOn "githubRelease", "bintrayUploadAll", "artifactoryPublishAll"
dependsOn "githubRelease", "artifactoryPublishAll"
}

task getVersion() {
Expand Down
47 changes: 0 additions & 47 deletions gradle/gradle-push.sh

This file was deleted.

54 changes: 0 additions & 54 deletions gradle/java-publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ if (project.hasProperty('disableShipkit')) {

apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'com.jfrog.bintray'

////////////////////////////////////////////////
// Artifact setup
Expand Down Expand Up @@ -127,56 +126,3 @@ artifactory {
artifactoryPublish {
skip = project.hasProperty('artifactory.dryRun')
}

////////////////////////////////////////////////
// Bintray publishing TODO remove
////////////////////////////////////////////////

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')

publish = true

dryRun = project.hasProperty("bintray.dryRun") //useful for testing

if (project.ext.has('publications')) {
publications = project.ext.publications
} else {
publications = ['jar']

if (plugins.hasPlugin('pegasus')) {
publications += 'dataTemplate'
}
}

pkg {
repo = 'maven'
userOrg = 'linkedin'
name = 'datahub-gma'

licenses = ['Apache-2.0']
labels = ['metadata', 'datahub', 'gma']
version {
// disable gpg signing to speed up publishing
gpg {
sign = false
}
// disable upload to maven central
mavenCentralSync {
sync = false
}
}
}
}

bintrayUpload {
// Bintray normally doesn't depend on POM generation, but we need it.
tasks.withType(GenerateMavenPom) {
bintrayUpload.dependsOn it
}

doFirst {
println "Publishing $jar.baseName to Bintray (dryRun: $dryRun, repo: $repoName, publish: $publish)"
}
}
2 changes: 1 addition & 1 deletion scripts/li-local-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ VERSION="$(./gradlew -q getVersion)-SNAPSHOT"
echo "Publishing GMA $VERSION to ${LOCAL_REPO}..."

# Publish artifacts to Maven local, but override the repo path and add a -SNAPSHOT suffix to avoid confusion with
# versions published to bintray.
# versions published to artifactory.
./gradlew -Dmaven.repo.local=$LOCAL_REPO publishToMavenLocal -Pversion="${VERSION}"

if [ $? = 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/local-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Publishes artifacts to the local maven repository, also setting the version to a SNAPSHOT version to avoid confusion
# with the artifacts published to bintray.
# with the artifacts published to artifactory.

VERSION="$(./gradlew -q getVersion)-SNAPSHOT"

Expand Down

0 comments on commit 3e9bd89

Please sign in to comment.