Delivery-focussed Elixir, Python, XSL/XQuery, (No)SQL, and Agile consultancy, specialising in content migration, API design, and (micro)services.

LinkedIn Octocat RSS

Using Travis-CI with submodules

Update:

This issue seems to have been somewhat fixed; you can now ignore all submodules by setting the following in your .travis.yml file:

git:
    submodules: false

You may still experience problems if you rely on some public submodules but want to ignore others. Hopefully, the developers will enhance this feature allowing us to list which submodules we want to include/skip.

Original Issue

I recently started using travis-ci for continuous integration testing with my various projects (mainly FWRD). Now it’s working, I’m really happy with the results; having the highlighted output generated by my spec config shown in the output is a nice touch.

However, it was initially a pain to use. Firstly, there was no documentation on how to use it with my preferred Python sandboxing system, zc.buildout. Secondly, once I had the config correct, I got a weird error from the build:

Using worker: ruby4.worker.travis-ci.org:travis-ruby-3
$ cd ~/builds
$ git clone --depth=100 --quiet git://github.com/OldhamMAde/FWRD.git OldhamMade/FWRD
$ cd OldhamMade/FWRD
$ git checkout -qf 84315504720c010cb6c92b352c9833739403368e
$ git submodule init
Submodule 'docs/build' (git@github.com:OldhamMade/FWRD.git) registered for path 'docs/build'
$ git submodule update
Cloning into docs/build...
Warning: Permanently added 'github.com,201.10.10.201' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Clone of 'git@github.com:OldhamMade/FWRD.git' into submodule path 'docs/build' failed
Done. Build script exited with: 1

A little help from the guys in the IRC channel led me to the fact that travis-ci cannot download a submodule that isn’t on a public url (git://, https://). This causes a problem for me, since I manage my docs using a zc.buildout script and the submodule I set-up points to the gh-pages branch in the repository.

The only way to get this to work for both instances is to change the url for the submodule from git@github.com:user/repo.git to https://user@github.com/user/repo.git - which will work fine with travis but will require you to enter your github password if you wish to update/commit your submodule.


Originally posted: Jan 10 2013