Skip to content

Commit dd6185f

Browse files
committed
Travis, deploy artifact to JFrog OSS repository
1 parent 272badd commit dd6185f

File tree

5 files changed

+48
-1
lines changed

5 files changed

+48
-1
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ indent_size = 4
88
indent_style = space
99
insert_final_newline = true
1010
trim_trailing_whitespace = true
11+
12+
[*.yml]
13+
indent_size = 2
14+
15+
[script/*]
16+
indent_style = tab

.maven-bintray.xml

Lines changed: 13 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ language: java
33
jdk:
44
- openjdk7
55
- oraclejdk8
6+
env:
7+
global:
8+
- secure: "arKo+t0dCh3i3AaF6Lq2OXez90jz5zLjkSj//66VyvHEDuWbnvqQRubGH8JQLl3wjN/PzIlypWRUMApseOGp/mi0Twwlk6NjW13Tu/5fwmwdzQO1RhCPuJSBuGECrLDAWg1hRYxWtCpfbPCYX8TYrrbHtC5hu4FAYK/59HArmFo=" # BINTRAY_API_KEY
69

710
# Cache local Maven repository.
811
cache:
@@ -11,3 +14,4 @@ cache:
1114

1215
after_success:
1316
- mvn jacoco:report coveralls:report
17+
- script/travis-deploy

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Just add this artifact to your project:
169169
</dependency>
170170
----
171171

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

174174
[source, xml]
175175
----

script/travis-deploy

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
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}.2" != "$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)