Publishing snapshots from travis-ci

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Publishing snapshots from travis-ci

jewzaam
Administrator
https://gist.github.com/neothemachine/4060735
and
http://docs.travis-ci.com/user/build-configuration/#Secure-environment-variables

I've playing with lightblue-audit-hook repo right now.  The idea is to get away from internal jenkins, and this looks like a good bit of the work towards that goal.

gem install travis
cd lightblue-audit-hook
travis encrypt SONATYPE_USERNAME=theusername --add env.global
travis encrypt SONATYPE_PASSWORD=thepassword --add env.global

and then add this to .travis.yml under after_success:
- "[[ $TRAVIS_BRANCH == \"master\" ]] && { mvn clean deploy -DskipTests; };"

Once it's working it should also be updated to only publish snapshot versions.  I think publishing to central should not be automatic, and there's no guarentee travis would pick up the right commit if using the release plugin.
Reply | Threaded
Open this post in threaded view
|

Re: Publishing snapshots from travis-ci

jewzaam
Administrator
Updated settings.xml to pick up the username and password.  Also made it clear that whatever you want to deploy has to be setup in settings.xml.  I didn't include the ossrh id (central) so it can't push to anywhere except snapshot repo.  Updating to only deploy the openjdk7 artifacts too, since the oraclejdk8 build is just to see if it works.
Reply | Threaded
Open this post in threaded view
|

Re: Publishing snapshots from travis-ci

jewzaam
Administrator
All the following should deploy snapshots now:
* lightblue-core
* lightblue-mongo
* lightblue-rdbms
* lightblue-rest
* lightblue-audit-hook
* lightblue-applications

Note that for any new repos the secure env vars will have to be setup with the travis cli as they're encrypted per repo.  Means that forks cannot use it.
Reply | Threaded
Open this post in threaded view
|

Re: Publishing snapshots from travis-ci

jewzaam
Administrator
Confirmed (after a pom.xml tweak) they all deploy from travis-ci now.
Reply | Threaded
Open this post in threaded view
|

Re: Publishing snapshots from travis-ci

lcestari