Travis for Ansible

Hey guys,

it occured to me it might be interesting to set up Travis for Ansible.

Travis is a (free) continuous integration service for open source projects. Without getting too much into technical details, when set up properly, Travis will watch the project repository for updates (commits), and trigger a “build” when an update is encountered.

A build can do many things, but I’ve just set it up to run make tests; ideally, we would also run static analysis (pep8, pylint, pyflakes) on the code as well. When a build fails, emails can be sent out.

Anyway, I’ve gone ahead and set it up for my forked repo of Ansible. (I’ve done it just to see how it works; I’m very familiar with the practice of continuous integration and CI servers like Jenkins, so I wanted to check out how Travis works. If you guys don’t want to do this it’s no big deal.)

You can see what a build looks like here: https://travis-ci.org/Tinche/ansible-ci/builds/5926612

The point of this is that the devs get notified when tests start failing (or pylint starts complaining, if someone sets it up). This sounds like an easy step in the SQA dimension for Ansible. There are more things that can be done for SQA purposes, but this is a low-hanging fruit and a good stepping board, I think. Also, you get to put a nice “Build status: passing” in the github README, so potential users can inspect the builds and be reassured.

If you guys think this is an interesting idea, I’d be happy to help out. All the tests passed on first build except one (the git module test) which can and should be easily fixed. You’d basically need to pull something from me (a very basic .travis.yml file, and the git test fix), register at Travis (with a github account), and set up a service hook for the Ansible repository to push notifications to Travis.

Hi Tin,

Been there, tried that, and I wasn't the only one :
https://github.com/ansible/ansible/issues/search?q=travis

I also think it's a good idea.

May be with the growing number of contribs, this might be reconsidered.

M

As another person who tried, I also hope Michael will reconsider this. (Or,
alternatively, provide another solution for CI testing).

Lorin

Oh wow, guess I should have searched first. But as I said, I was curious how it all works so I don’t consider it wasted effort.

I think it’s unfortunate if Michael still isn’t interested in Travis; it’s a very simple step and I think it definitely has value for the project.

We won't be using Travis.

Later, down the road, we'll have a real integration test farm that can
actually test things on multiple distributions and that is more easily
extensible.