buildpassingedited

We can now display the status of our last build in Git Hub using Travis CI. This will give a very clear information of the working condition of your code for anyone who is interested to use it .

In this post, I will walk thorough the steps to display the build status of a latest build using Travis CI.

Prerequisites :

  • Git Hub account with a public Repository : Git Hub is an open source web based version control. Once you signup on Git Hub you can create public repositories and push your codes into it. If you are not familiar with using Git Hub, please check the url
  • Travis CI Continuous Integration setup using Git Hub (logged in with your Git Hub ): If you are not sure how to setup the continuous integration of your Git Hub projects, please check the url

Lets get started.. (check out the source codes for this session in the Git Hub url)

Copying the status Image of from Travis CI

  • Login into your Travis Account and all your active repositories will be displayed in the Dashboard. Now click the active repository for which you want to update the status of the Build.

TravisCIHome

  • Once your build is completed, the status of the build will be displayed along with the Repository name. Now click on the build status “build passed/build failed” and then select Image URL from drop down. Copy the url displayed. In this case I will be copying the url – https://travis-ci.org/sandybegn/TravisCI.svg?branch=master

ImageURL

Setting up Git Hub account to display the build status

  • Open your Git Hub repository and edit the Read Me file. Paste the above copied url into the begining of your Read Me file . Now update the url to look like the below

![Build Status](https://travis-ci.org/sandybegn/TravisCI.svg?branch=master).

Now provide your commit comments and click Commit Changes button. This will               commit the changes and trigger a new build in your Travis CI page. Once the build is         completed, refresh the Git Hub repository Read Me section and you can see the                   status of the build appearing in place of the url we pasted before.

Buildstatusfinal

Advertisement