###Prerequirements
- github token, hereafter refered to as
$GITHUB_TOKEN
- ruby/gem to install the travis client:
sudo gem install travis
###Adding travis-ci support
1. git clone the project/repository you want to add travis support to, and cd into the clone
2. what type of project is it? Choose the appropriate .travis.yml
template and copy it into the root of your git repo/project
- grails application .travis.yml template
- grails plugin .travis.yml template
- pom.xml/mvn project .travis.yml template
3. add the .travis.yml file to your git repo/project:
git add .travis.yml
4. Use the travis client to login:
travis login --github-token $GITHUB_TOKEN
5. Enable travis-ci.org support for this github repo/project
travis enable --org --no-interactive
6. OPTIONAL step, configure/customize some of the travis-ci.org settings:
travis settings builds_only_with_travis_yml --enable --no-interactive
travis settings build_pull_requests --disable --no-interactive
7. ENCRYPT and add to .travis.yml
all the encrypted env vars your git project uses/requires to build/test on travis-ci.org:
travis encrypt -a -p "TRAVIS_DEPLOY_USERNAME=deployment"
travis encrypt -a -p "SOME_OTHER_VAR=some-other-value-here"
...
8. Add your changes to git
git add .travis.yml
9. Add travis-ci build status badge to your README.md file, and add it to the git ($repo
is your github repo/project name):
echo "### $repo [](https://travis-ci.org/AtlasOfLivingAustralia/$repo)"
git add README.md
10. for grails application and grails plugin projects you need to add the release/publisher plugin to your grails project settings:
- for grails < 2.3 add
plugins.maven-publisher=0.8.1
to yourapplication.properties
, andgit add application.properties
- for grails >=2.3 add
build ":release:3.0.1"
to yourgrails-app/conf/BuildConfig.groovy
, andgit add grails-app/conf/BuildConfig.groovy
11. finally commit and push your changes to git/github
git commit -m "added travis-ci.org support"
git push