Skip to content

Commit

Permalink
+ Added travis deployment setting and script
Browse files Browse the repository at this point in the history
  • Loading branch information
Hi-Fi committed Jan 29, 2017
1 parent ac3e1d1 commit b902a15
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .travis.yml
@@ -1,5 +1,27 @@
language: java
## No installation
install: true
## Run Integration tests
script: "mvn test && mvn verify"
jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
install:
- mvn --settings .travis/settings.xml install -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
before_install:
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
deploy:
-
provider: script
script: .travis/deploy.sh
skip_cleanup: true
on:
repo: Hi-Fi/robotframework-httprequestlibrary
branch: master
jdk: oraclejdk8
-
provider: script
script: .travis/deploy.sh
skip_cleanup: true
on:
repo: Hi-Fi/robotframework-httprequestlibrary
tags: true
jdk: oraclejdk8
15 changes: 15 additions & 0 deletions .travis/deploy.sh
@@ -0,0 +1,15 @@
#!/bin/bash

if [ -z "$SONATYPE_USERNAME" ]
then
echo "error: please set SONATYPE_USERNAME and SONATYPE_PASSWORD environment variable"
exit 1
fi

if [ -z "$SONATYPE_PASSWORD" ]
then
echo "error: please set SONATYPE_PASSWORD environment variable"
exit 1
fi

mvn clean deploy --settings .travis/settings.xml -DskipTests=true -B -U -Prelease
25 changes: 25 additions & 0 deletions .travis/settings.xml
@@ -0,0 +1,25 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>

0 comments on commit b902a15

Please sign in to comment.