Apache development
with GitHub and Travis CI
GitHub
“GitHub is the best place to
share code with friends, co-
workers, classmates, and
complete strangers.”
https://github.com/about
Travis CI
“Travis CI - Free Hosted
Continuous Integration
Platform for the Open
Source Community”
https://travis-ci.org/
The Apache Software Foundation
“The mission of the Apache
Software Foundation (ASF)
is to provide software for the
public good. We do this by
providing services and
support for many for like-
minded software project
communities of individuals.”
http://www.apache.org/foundation/
External services
• Many free external services available for Apache projects
• SVNsearch, FishEye 6, …
• MarkMail, GMane, Nabble, …
• IRCnet, Google Hangouts, Skype, …
• Twitter, Facebook, Stack Overflow, Ohloh, …
• Complement and extend the services provided by the ASF
• Remember:
• Canonical source and releases on Apache hardware
• Important decisions on the Apache mailing lists or issue trackers
• Avoid splintering the community
GitHub
Git at Apache
• Writable Git repositories as an alternative to Subversion
• https://git-wip-us.apache.org/
• Read-only Git mirrors as a complement to Subversion
• http://git.apache.org/
• git svn dcommit allows committing to svn from a git clone
• Both types of repositories are mirrored to GitHub
• https://github.com/apache
• GitHub supports also Subversion checkouts
• https://help.github.com/articles/support-for-subversion-clients
Apache at GitHub
Committers team
Want to link your GitHub account
to the Apache organization?
(Does not grant any extra
permissions; just a way to
display affiliation.)
See instructions at
https://svn.apache.org/repos/private/committers/docs/github_team.txt
Jackrabbit Oak at GitHub
Personal fork
Temporary branches
Setting up git-svn
$ git clone https://github.com/apache/jackrabbit-oak.git
$ cd jackrabbit-oak
$ git remote add fork https://github.com/jukka/jackrabbit-oak.git
$ git svn init --prefix=origin/ -s 
https://svn.apache.org/repos/asf/jackrabbit/oak
$ git svn rebase
Before first use:
$ git config --global user.name „Jukka Zitting‟
$ git config --global user.email „jukka@apache.org‟
$ curl http://git.apache.org/authors.txt > $HOME/.gitauthors
$ git config --global svn.authorsfile $HOME/.gitauthors
Travis CI
Setting up a Travis build
• Requirements
• A .travis.yml configuration file
• Travis web hook enabled in the GitHub mirror
• Once in place, Travis will automatically
• detect when there are new changes
• start a clean virtual machine based on your configuration
• runs any configured setup tasks
• runs the configured integration build
• records the result of the build and send configured notifications
• Also pull requests will get built!
Limitations
• Build time currently limited to 50 minutes
• parts of a matrix build can each have their own time limit
• consider the other users of the system
• Limited network access
• can download dependencies from big repositories like Maven
• only few options for deploying successful build artifacts
• Tricky email notifications
• VERP makes them incompatible with Apache mailing lists
Example configuration
# see http://docs.travis-ci.com/user/build-configuration/
install: true
script: mvn verify -Ppedantic,integrationTesting
language: java
jdk:
- oraclejdk7
services: mongodb
notifications:
email: false
webhooks:
urls: http://zitting.name/travis/notify
on_success: change
on_failure: change
Questions?

Apache development with GitHub and Travis CI

  • 1.
  • 2.
    GitHub “GitHub is thebest place to share code with friends, co- workers, classmates, and complete strangers.” https://github.com/about
  • 3.
    Travis CI “Travis CI- Free Hosted Continuous Integration Platform for the Open Source Community” https://travis-ci.org/
  • 4.
    The Apache SoftwareFoundation “The mission of the Apache Software Foundation (ASF) is to provide software for the public good. We do this by providing services and support for many for like- minded software project communities of individuals.” http://www.apache.org/foundation/
  • 5.
    External services • Manyfree external services available for Apache projects • SVNsearch, FishEye 6, … • MarkMail, GMane, Nabble, … • IRCnet, Google Hangouts, Skype, … • Twitter, Facebook, Stack Overflow, Ohloh, … • Complement and extend the services provided by the ASF • Remember: • Canonical source and releases on Apache hardware • Important decisions on the Apache mailing lists or issue trackers • Avoid splintering the community
  • 6.
  • 7.
    Git at Apache •Writable Git repositories as an alternative to Subversion • https://git-wip-us.apache.org/ • Read-only Git mirrors as a complement to Subversion • http://git.apache.org/ • git svn dcommit allows committing to svn from a git clone • Both types of repositories are mirrored to GitHub • https://github.com/apache • GitHub supports also Subversion checkouts • https://help.github.com/articles/support-for-subversion-clients
  • 8.
  • 9.
    Committers team Want tolink your GitHub account to the Apache organization? (Does not grant any extra permissions; just a way to display affiliation.) See instructions at https://svn.apache.org/repos/private/committers/docs/github_team.txt
  • 10.
  • 11.
  • 12.
  • 13.
    Setting up git-svn $git clone https://github.com/apache/jackrabbit-oak.git $ cd jackrabbit-oak $ git remote add fork https://github.com/jukka/jackrabbit-oak.git $ git svn init --prefix=origin/ -s https://svn.apache.org/repos/asf/jackrabbit/oak $ git svn rebase Before first use: $ git config --global user.name „Jukka Zitting‟ $ git config --global user.email „jukka@apache.org‟ $ curl http://git.apache.org/authors.txt > $HOME/.gitauthors $ git config --global svn.authorsfile $HOME/.gitauthors
  • 14.
  • 15.
    Setting up aTravis build • Requirements • A .travis.yml configuration file • Travis web hook enabled in the GitHub mirror • Once in place, Travis will automatically • detect when there are new changes • start a clean virtual machine based on your configuration • runs any configured setup tasks • runs the configured integration build • records the result of the build and send configured notifications • Also pull requests will get built!
  • 16.
    Limitations • Build timecurrently limited to 50 minutes • parts of a matrix build can each have their own time limit • consider the other users of the system • Limited network access • can download dependencies from big repositories like Maven • only few options for deploying successful build artifacts • Tricky email notifications • VERP makes them incompatible with Apache mailing lists
  • 17.
    Example configuration # seehttp://docs.travis-ci.com/user/build-configuration/ install: true script: mvn verify -Ppedantic,integrationTesting language: java jdk: - oraclejdk7 services: mongodb notifications: email: false webhooks: urls: http://zitting.name/travis/notify on_success: change on_failure: change
  • 18.