Skip to content

Commit

Permalink
Add travis config to deploy snapshots to sonatype.
Browse files Browse the repository at this point in the history
This needs the actual sonatype username and password added
after running through a 'travis encrypt' command.

Only try to deploy from one entry in the matrix, so pulled
openjdk6 out of the main jdk matrix and added a separate
entry with its own script with the deploy command.
  • Loading branch information
tomdcc committed May 22, 2013
1 parent 337c9e5 commit fa1c14b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .travis-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
language: java
script: mvn -q clean install
jdk:
- openjdk6
- openjdk7
- oraclejdk7
- openjdk7
- oraclejdk7
matrix:
# override script for jdk 6 to push snapshots to sonatype
include:
jdk: openjdk6
script: mvn -q clean deploy --settings .travis-settings.xml
# whitelist
branches:
only:
Expand All @@ -15,3 +19,7 @@ notifications:
irc:
- "irc.freenode.org#cucumber"

env:
global:
- secure: 'INSERT OUTPUT FROM [travis encrypt -r cucumber/cucumber-jvm "CI_DEPLOY_USERNAME=<sonatype-username>"] HERE'
- secure: 'INSERT OUTPUT FROM [travis encrypt -r cucumber/cucumber-jvm "CI_DEPLOY_PASSWORD=<sonatype-password>"] HERE'

0 comments on commit fa1c14b

Please sign in to comment.