Skip to content

Fix bintray deployment step #6

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

Merged
merged 1 commit into from
Feb 20, 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
35 changes: 21 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ dist: trusty
jdk:
- oraclejdk8

notifications:
email: true

env:
global:
- BINTRAY_REPONAME=ibm-cloud-sdk-repo
- BINTRAY_PKGNAME=com.ibm.cloud:sdk-core

branches:
except:
- gh-pages
Expand All @@ -14,18 +22,18 @@ cache:

install: true

env:
global:
- BINTRAY_REPO=ibm-cloud-sdk-repo
- BINTRAY_PKGNAME=com.ibm.cloud:sdk-core

# For a tagged build, we'll set the maven artifact version #
# and resolve the variable references in the bintray config.
# For a tagged build, we'll set the maven artifact version #.
before_script:
- env
- echo "TRAVIS_TAG = '${TRAVIS_TAG}'"
- '[ "${TRAVIS_TAG}" != "" ] && mvn versions:set -DnewVersion=${TRAVIS_TAG} -DgenerateBackupPoms=false || true'
- cat build/bintray-config.template | envsubst >bintray-config.json
- '[ "${TRAVIS_TAG}" != "" ]
&& mvn versions:set -DnewVersion=${TRAVIS_TAG} -DgenerateBackupPoms=false
|| true'
- '[ "${TRAVIS_TAG}" != "" ]
&& cat build/bintray-config.template | envsubst >bintray-config.json
&& echo "Contents of bintray-config.json:"
&& cat bintray-config.json
|| true'

script:
- mvn clean package
Expand All @@ -42,13 +50,12 @@ deploy:
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file:
- target/sdk-core-*.jar
- target/java-sdk-core-*.jar
skip_cleanup: true
on:
tags: true

# Ask bintray to sync the just-deployed artifact to maven central
after_script:
- build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPONAME $BINTRAY_PKGNAME $TRAVIS_TAG

notifications:
email: true
- '[ "${TRAVIS_TAG}" != "" ]
&& build/sync2MC.sh $BINTRAY_USER $BINTRAY_APIKEY $BINTRAY_REPONAME $BINTRAY_PKGNAME $TRAVIS_TAG'
2 changes: 1 addition & 1 deletion build/bintray-config.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"vcs_url": "https://github.com/IBM/java-sdk-core.git",
"repo": "${BINTRAY_REPONAME}",
"issue_tracker_url": "https://github.com/IBM/java-sdk-core/issues",
"subject": "${BINTRAY_USER}",
"subject": "padamstx",
"website_url": "https://github.com/IBM/java-sdk-core",
"name": "${BINTRAY_PKGNAME}"
},
Expand Down