Skip to content

Commit a639a91

Browse files
committed
Travis, deploy artifacts to JFrog OSS repository
1 parent 8c6965c commit a639a91

File tree

5 files changed

+52
-8
lines changed

5 files changed

+52
-8
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ trim_trailing_whitespace = true
1111

1212
[*.{adoc,yml}]
1313
indent_size = 2
14+
15+
[script/*]
16+
indent_style = tab

.maven-bintray.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
5+
6+
<servers>
7+
<server>
8+
<id>jfrog-oss-snapshot-local</id>
9+
<username>jirutka</username>
10+
<password>${env.BINTRAY_API_KEY}</password>
11+
</server>
12+
</servers>
13+
</settings>

.travis.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ jdk:
44
- openjdk7
55
- oraclejdk8
66
env:
7-
- SPRING_VERSION=3.2.16.RELEASE
8-
- SPRING_VERSION=4.0.9.RELEASE
9-
- SPRING_VERSION=4.1.9.RELEASE
10-
- SPRING_VERSION=4.2.4.RELEASE
7+
global:
8+
secure: "DiliRHV1VROi28XVoFVupupLMVJ0IqyuJsBR2NyfjhAB4eOvwyRY78H2iNzZ5TPkgQ2x5roCE9vDF4WRlRGd/rTgs2YvRjCL2tOpjxYXgyjuFKq0HtnG6Jpr45LV7dmTxiAUXjiNUa9SSr30CXAOEM2dcPYjci3Ze7HV/5BtkSU=" # BINTRAY_API_KEY
9+
matrix:
10+
- SPRING_VERSION=3.2.16.RELEASE
11+
- SPRING_VERSION=4.0.9.RELEASE
12+
- SPRING_VERSION=4.1.9.RELEASE
13+
- SPRING_VERSION=4.2.4.RELEASE
1114

1215
# Cache local Maven repository.
1316
cache:
@@ -22,3 +25,4 @@ script:
2225
- mvn verify -Dspring.version=$SPRING_VERSION --batch-mode
2326
after_success:
2427
- mvn jacoco:report coveralls:report
28+
- script/travis-deploy

README.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,14 @@ Just add this artifact to your project:
271271
</dependency>
272272
----
273273

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

276276
[source, xml]
277277
----
278278
<repository>
279-
<id>sonatype-snapshots</id>
280-
<name>Sonatype repository for deploying snapshots</name>
281-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
279+
<id>jfrog-oss-snapshot-local</id>
280+
<name>JFrog OSS repository for snapshots</name>
281+
<url>https://oss.jfrog.org/oss-snapshot-local</url>
282282
<snapshots>
283283
<enabled>true</enabled>
284284
</snapshots>

script/travis-deploy

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
# vim: set ts=4:
3+
set -o errexit
4+
5+
cd "$(dirname "$0")/.."
6+
7+
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
8+
echo 'This is a pull request, skipping deploy.'; exit 0
9+
fi
10+
11+
if [ -z "$BINTRAY_API_KEY" ]; then
12+
echo '$BINTRAY_API_KEY is not set, skipping deploy.'; exit 0
13+
fi
14+
15+
if [ "$TRAVIS_BRANCH" != 'master' ]; then
16+
echo 'This is not the master branch, skipping deploy.'; exit 0
17+
fi
18+
19+
if [ "${TRAVIS_BUILD_NUMBER}.8" != "$TRAVIS_JOB_NUMBER" ]; then
20+
echo 'This is not the build job we are looking for, skipping deploy.'; exit 0
21+
fi
22+
23+
echo '==> Deploying artifact to JFrog OSS Maven repository'
24+
mvn deploy --settings .maven-bintray.xml -Dgpg.skip=true -DskipTests=true

0 commit comments

Comments
 (0)