{
  "$type": "site.standard.document",
  "path": "/migrating-from-bamboo-to-travis-ci/",
  "publishedAt": "2015-12-12T13:25:02.000Z",
  "site": "at://did:plc:6gssgguzeecdttuw4gpdshg2/site.standard.publication/self",
  "tags": [
    "travis-ci",
    "java",
    "spring-boot",
    "github"
  ],
  "textContent": "At work we have been using Bamboo for a little over a year. It has served us well in the past, but for our newest project it has just not be working well. The cloud version seems to be severely limited.\n\nWant to upload your app to AWS after it's built? Yes, there is a plugin for that but it does not support Bamboo cloud. Headless browser testing? Well it is possible, but you have to configure your own EC2 instances.\n\nBamboo just does not seem to be moving forward. As a tool it was starting to get in our way. We decided it was time for our team to try something new.\n\nI've been looking for a opportunity to give Travis-CI a try. Travis-CI builds over 200,000 project and has over 100,000 users. They must be onto something. It almost feels like every GitHub project is building with Travis-CI.\n\nIn less than a few hours we migrated to Travis-CI. It was quick and painless.\n\nHow we migrated\n\nUnlike Bamboo, Travis-CI keeps the build configuration in your project. .travis.yml is where all the magic happens. This file controls everything.\n\nStep 1: Create an account\n\nYou of course have to set an account with Travis-CI. They use your GitHub credentials to login. Then just enable your repository in Travis-CI: https://travis-ci.com/getting_started\n\nStep 2: Building\n\nTo have your project build you first need to add a .travis.yml. Our project is Java 8/Gradle so the initial file looked like this:\n\n[Embedded code (GitHub Gist)]\n\nStep 3: Migrating status scripts\n\nI wrote some status scripts that I covered in a previous blog post. I won't go into their functional details here, but I will cover the migration changes.\n\nTravis-CI also lets you run scripts. These scripts have to be part of the repository. This is a really good idea, build scripts are code and all code should be in your repository. I added the script to our project under src/main/scripts/post-build.sh. I had to replace the Bamboo variables with their Travis-CI equivalents.\n\n[Embedded code (GitHub Gist)]\n\nAll we have to do now is tell Travis-CI to call this script after the build. This is done with the after_success setting.\n\n[Embedded code (GitHub Gist)]\n\nThat's all it took. Six lines of configuration and moving our post build scripts.\n\nFuture topics\n\nSetting up the new build took so little time that I ended up setting up a few extras:\n\nCoveralls coverage reporting.\n\nSlack Notifications for Travis builds.\n\nAutomatic deployment of our builds to Amazon Elastic Beanstalk.\n\nI'll cover those three and headless browser testing in a future post!\n\nRead the original post with all embeds and interactive content at https://rants.broonix.ca/migrating-from-bamboo-to-travis-ci/",
  "title": "Migrating to Travis-CI from Bamboo"
}