Skip to content

Commit

Permalink
Travis, deploy artifacts to JFrog OSS repository
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Feb 27, 2016
1 parent 7f6e713 commit 9590456
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ trim_trailing_whitespace = true

[*.yml]
indent_size = 2

[script/*]
indent_size = 4
indent_style = tab
13 changes: 13 additions & 0 deletions .maven-bintray.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">

<servers>
<server>
<id>jfrog-oss-snapshot-local</id>
<username>jirutka</username>
<password>${env.BINTRAY_API_KEY}</password>
</server>
</servers>
</settings>
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ jdk:
- openjdk7
- oraclejdk8
env:
- HV_VERSION=4.3.1.Final
- HV_VERSION=5.0.3.Final
- HV_VERSION=5.1.3.Final
- HV_VERSION=5.2.3.Final
global:
secure: "KncKGamS99AWFQNs2L4a3s65BdNvP07yD/fulNZA+tsBNVLgxsieXkRdzrA5Efxbd5PvnBJuLkYgjPFSFh4uPNwijH5PnZMsSYlnSFIbLyGAIkWx2cJeUoDXOOrbHIeRmCDS6gZjs9sUZHrVlhF9B/19txf4XUjpd/6slqdsEng=" # BINTRAY_API_KEY
matrix:
- HV_VERSION=4.3.1.Final
- HV_VERSION=5.0.3.Final
- HV_VERSION=5.1.3.Final
- HV_VERSION=5.2.3.Final

# Cache local Maven repository
cache:
Expand All @@ -22,3 +25,4 @@ script:
- mvn verify -Ptest-different-hv-version -Dhv.version.test=${HV_VERSION} --batch-mode
after_success:
- mvn jacoco:report coveralls:report
- script/travis-deploy
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ Just add this artifact to your project:
</dependency>
----

However if you want to use the last snapshot version, you have to add the Sonatype OSS repository:
However if you want to use the last snapshot version, you have to add the JFrog OSS repository:

[source, xml]
----
<repository>
<id>sonatype-snapshots</id>
<name>Sonatype repository for deploying snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>jfrog-oss-snapshot-local</id>
<name>JFrog OSS repository for snapshots</name>
<url>https://oss.jfrog.org/oss-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
Expand Down
24 changes: 24 additions & 0 deletions script/travis-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# vim: set ts=4:
set -o errexit

cd "$(dirname "$0")/.."

if [[ "$TRAVIS_PULL_REQUEST" != 'false' ]]; then
echo 'This is a pull request, skipping deploy.'; exit 0
fi

if [[ -z "$BINTRAY_API_KEY" ]]; then
echo '$BINTRAY_API_KEY is not set, skipping deploy.'; exit 0
fi

if [[ "$TRAVIS_BRANCH" != 'master' ]]; then
echo 'This is not the master branch, skipping deploy.'; exit 0
fi

if [[ "${TRAVIS_BUILD_NUMBER}.5" != "$TRAVIS_JOB_NUMBER" ]]; then
echo 'This is not the build job we are looking for, skipping deploy.'; exit 0
fi

echo '==> Deploying artifact to JFrog OSS Maven repository'
mvn deploy --settings .maven-bintray.xml -Dgpg.skip=true -DskipTests=true

0 comments on commit 9590456

Please sign in to comment.