Skip to content

Commit

Permalink
Merge pull request #243 from rundeck/bintray-release-publish-fix
Browse files Browse the repository at this point in the history
fix: travis deploy for maven doesn't work
  • Loading branch information
gschueler authored Jun 25, 2019
2 parents b3c7216 + c7bd2b3 commit 2e321ae
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 95 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ deploy:
file_glob: true
skip_cleanup: true
after_deploy:
- ./gradlew -p rd-cli-tool -PbintrayUser=gschueler -PbintrayUserOrg=rundeck -PbintrayRepo=rundeck-rpm -Pcomponent=rpm bintrayUpload
- ./gradlew -p rd-cli-tool -PbintrayUser=gschueler -PbintrayUserOrg=rundeck -PbintrayRepo=rundeck-deb -Pcomponent=deb bintrayUpload
- ./gradlew -p rd-api-client -PbintrayUser=gschueler -PbintrayUserOrg=rundeck -PbintrayRepo=rundeck-maven bintrayUpload
- ./gradlew -PbintrayUser=gschueler -PbintrayUserOrg=rundeck -PbintrayRepo=rundeck-rpm -Pcomponent=rpm bintrayUpload
- ./gradlew -PbintrayUser=gschueler -PbintrayUserOrg=rundeck -PbintrayRepo=rundeck-deb -Pcomponent=deb bintrayUpload
- ./gradlew -PbintrayUser=gschueler -PbintrayUserOrg=rundeck -PbintrayRepo=rundeck-maven -Pcomponent=api bintrayUpload
env:
global:
- secure: 2LDWRCZsuUYNUNHQz4oiaq9VIcdp0ziI7SKBxUxfqT4rehJ0J7kz+UPqwtgxMiUyQaHJQqzkcR+m6H3VZj9BREY+POiyu+yJOqhe3KRpDAfiN/gnwN81Nh9wloVaxyVe6i5yPaaBvE5vIREi7SAUdDtdsQ6WSkQ3JnaSL5Nz6e3DKR6+wgaTmBhh/TTW1YuN1qo5EjBpm0//M+KwY5BvVYOfPYLHCpVqnWFePQBkZY13lvufC5XPipXMf6c5Un/Uy6oVaRgLSPHDyELQvBzMSRPtzNmJSDm75LvclHHgDYEUcrcxRoWgAEISaBeIpGhe/PnsswCtQMfQBIm0W8Cv+HThbdCrrTdz/hWsohVvLFkCl9L8NOTOnATr2I9F0GBmsdhJvvr10JqGGol8Y9wwu5eiO9AWmchjZPicIWj5Dwo9E8AdT20aX4l287StESedS/Wtqh7gdf4d3Y1svWLEmh3gbERqOI9hRDV0DotfumhaW49SbaN/XecODiyPrnLBONSrYk1bWADDAvBZm/Jy0hvFbaVFFI8HfZMVJCO4GJJwna2MEMnsouNl2eDBFtvX5JHQ00JP4QacPFwW3/0NsgdaUGLiPSNezNJ1kBYtVbhQg4oL3yTkFaU6KuGhJcdSCVJUwOeP0YZF0oklofLhEhc4puzAi6EmGvLpMeh/huw=
Expand Down
90 changes: 0 additions & 90 deletions gradle/bintray.gradle

This file was deleted.

6 changes: 5 additions & 1 deletion rd-api-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def bintrayUserOrg = project.hasProperty('bintrayUserOrg') ? project.property('b
def bintrayRepo = project.hasProperty('bintrayRepo') ? project.property('bintrayRepo') :
System.getenv('BINTRAY_REPO')

if (bintrayUser && bintrayKey && bintrayRepo) {
def component = (
project.hasProperty('component') ? project.property('component') :
System.getenv('BINTRAY_UPLOAD_COMPONENT')
)
if (component && ['api'].contains(component) && bintrayUser && bintrayKey && bintrayRepo) {

apply plugin: 'com.jfrog.bintray'
bintray {
Expand Down
71 changes: 70 additions & 1 deletion rd-cli-tool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,73 @@ buildRpm.dependsOn shadowDistZip
assemble.dependsOn buildRpm, buildDeb


apply from: '../gradle/bintray.gradle'
def bintrayUser = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
def bintrayKey = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') :
System.getenv('BINTRAY_API_KEY')
def bintrayUserOrg = project.hasProperty('bintrayUserOrg') ? project.property('bintrayUserOrg') :
System.getenv('BINTRAY_USER_ORG')
def bintrayRepo = project.hasProperty('bintrayRepo') ? project.property('bintrayRepo') :
System.getenv('BINTRAY_REPO')

def component = (
project.hasProperty('component') ? project.property('component') :
System.getenv('BINTRAY_UPLOAD_COMPONENT')
)
if (component && ['rpm','deb'].contains(component) && bintrayUser && bintrayKey && bintrayRepo) {

def components = [
rpm: [pat: '*.rpm'],
deb: [pat: '*.deb'],
]

if (!component || !components.containsKey(component)) {
throw new Exception(
"Component for upload not specified or invalid (${component}). Use gradle property -Pcomponent or env var BINTRAY_UPLOAD_COMPONENT.\n" +
"Valid values: ${components.keySet()}"
)
}

apply plugin: 'com.jfrog.bintray'
bintray {
user = bintrayUser
key = bintrayKey

filesSpec {
from("$buildDir/distributions") {
include components[component].pat
}

into "."
}

dryRun = false
publish = true
override = true
pkg {
name = 'rundeck-cli'
repo = bintrayRepo
if(bintrayUserOrg) {
userOrg = bintrayUserOrg
}
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/rundeck/rundeck-cli.git'
websiteUrl = 'https://github.com/rundeck/rundeck-cli'
issueTrackerUrl = 'https://github.com/rundeck/rundeck-cli/issues'
githubRepo = 'rundeck/rundeck-cli' //Optional Github repository
githubReleaseNotesFile = 'README.md' //Optional Github readme file
if(component=='deb'){
debian {
distribution = 'any'
component = 'main'
architecture = 'noarch'
}
}
version {
name = rpmVersion
desc = "Rundeck CLI Tools ${rpmVersion}"
vcsTag = "v${rpmVersion}"
}
}
}
}

0 comments on commit 2e321ae

Please sign in to comment.