aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-11 21:38:21 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-11 23:38:50 +0100
commit0133e8876c3270cfbb31d96a79cc9bbd411e4e2d (patch)
treea959b1c75056181b7ed4d9a043fc7c830dd50a0f
parent39636be7b018b9121696ce7bdc462ab2c3c8185d (diff)
downloadesper-testing-0133e8876c3270cfbb31d96a79cc9bbd411e4e2d.tar.gz
esper-testing-0133e8876c3270cfbb31d96a79cc9bbd411e4e2d.tar.bz2
esper-testing-0133e8876c3270cfbb31d96a79cc9bbd411e4e2d.tar.xz
esper-testing-0133e8876c3270cfbb31d96a79cc9bbd411e4e2d.zip
o Trying out travis-ci.org.
-rw-r--r--.travis-addServer.py45
-rw-r--r--.travis.yml13
2 files changed, 58 insertions, 0 deletions
diff --git a/.travis-addServer.py b/.travis-addServer.py
new file mode 100644
index 0000000..66de4eb
--- /dev/null
+++ b/.travis-addServer.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+import sys
+import os
+import os.path
+import xml.dom.minidom
+
+if os.environ["TRAVIS_SECURE_ENV_VARS"] == "false":
+ print "no secure env vars available, skipping deployment"
+ sys.exit()
+
+homedir = os.path.expanduser("~")
+
+m2 = xml.dom.minidom.parse(homedir + '/.m2/settings.xml')
+settings = m2.getElementsByTagName("settings")[0]
+
+serversNodes = settings.getElementsByTagName("servers")
+if not serversNodes:
+ serversNode = m2.createElement("servers")
+ settings.appendChild(serversNode)
+else:
+ serversNode = serversNodes[0]
+
+sonatypeServerNode = m2.createElement("server")
+sonatypeServerId = m2.createElement("id")
+sonatypeServerUser = m2.createElement("username")
+sonatypeServerPass = m2.createElement("password")
+
+idNode = m2.createTextNode("sonatype-nexus-snapshots")
+userNode = m2.createTextNode(os.environ["SONATYPE_USERNAME"])
+passNode = m2.createTextNode(os.environ["SONATYPE_PASSWORD"])
+
+sonatypeServerId.appendChild(idNode)
+sonatypeServerUser.appendChild(userNode)
+sonatypeServerPass.appendChild(passNode)
+
+sonatypeServerNode.appendChild(sonatypeServerId)
+sonatypeServerNode.appendChild(sonatypeServerUser)
+sonatypeServerNode.appendChild(sonatypeServerPass)
+
+serversNode.appendChild(sonatypeServerNode)
+
+m2Str = m2.toxml()
+f = open(homedir + '/.m2/mySettings.xml', 'w')
+f.write(m2Str)
+f.close()
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..edfc595
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: java
+
+env:
+ global:
+ - SONATYPE_USERNAME=80ymBYBJ
+ - secure: "fWNpQtw34CGKtdzBHpawA7dQSMVQg+wg+S7lj6DtAEGJIipSPk5Uod2DYEV+\nSsP9j9yn7VAwbdo8GGqUrS0FNqKctsc6k4COOw3JMAmQEo6HEvwf7aRy/R6x\n9RgMT2YAwC34NStAC/liJunc/4a7L+QHoikr2CFImbrUn4I5+/4="
+
+install: "mvn -DskipTests -U -B install"
+
+after_success:
+ - python .travis-addServer.py
+ # No need to run clean or run tests when simply deploying.
+ - mvn -DskipTests -B --settings ~/.m2/mySettings.xml deploy