Skip to content

Commit

Permalink
Travis: First test for automatic snapshot deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
chkal committed Nov 28, 2013
1 parent 478820c commit c0819a6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .travis-sonatype-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

echo "====================[ Snapshot deployer ]=========================="

IS_JDK7=`test $(java -version 2>&1 | fgrep -c '1.7.0') -gt 0; echo $?`
IS_AS7=`test "$CONTAINER" = 'jboss-as-managed'; echo $?`
IS_SECURE=`test "$TRAVIS_SECURE_ENV_VARS" = 'true'; echo $?`

echo "Built against JDK7: $IS_JDK7"
echo "JBoss AS7 profile active: $IS_AS7"
echo "Secure variables available: $IS_SECURE"

if [ $IS_JDK7 -eq 0 -a $IS_AS7 -eq 0 -a $IS_SECURE -eq 0 ]; then
mvn -s .travis-sonatype-settings.xml -DperformRelease -DskipTests deploy
else
echo "Not deploying snapshots"
fi

12 changes: 12 additions & 0 deletions .travis-sonatype-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<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>
<id>sonatype-nexus-snapshots</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>

</settings>
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
language: java
env:
- CONTAINER=jboss-as-managed
install: "mvn -P ${CONTAINER} -DJBOSS_REPO=true -DskipTests=true -B install"
script: "mvn -P ${CONTAINER} -DJBOSS_REPO=true test"
jdk:
- oraclejdk7
- openjdk6
env:
global:
- CONTAINER=jboss-as-managed
- secure: "OnYfX1bWd1nt4lU6fGEtiWc/AqNwac32YQEm8AdPaU83zOZGe2yyBOLX+fTxqp7CUPpbJM0kLCQzDTrurwXJNtd9D8b8C5rWBvvNS7tloVlwCMbfSiSXpJZK6bygGo0puQcnFtaivtmGD6DRZQWgbVKNdJf5iW/X+46k+nOZqtg="
- secure: "mjX857IwiXKts1ZWrKDVQOQpkFN+vUrPmQNneYim4dVN+McXOiyyvM/iYgH14E2FFHlWe/1fHLU59Wf34r7K7T+cd8J79D78u6dIljHmxucMu5+O7giexzkvEqTXafAQQrLSan0iUnU3dgcYbqaZ9Fz5ZRjC7gLF48mRUsf+lIc="

0 comments on commit c0819a6

Please sign in to comment.