Peter Butkovic
Peter Butkovic

Reputation: 12209

chaining builds in the TravisCI

Imagine situation like this on github:

where both of these have travis configured. However I'd like to run travis build of the repo 2 also in the case of successful travis build on the repo 1.

Any chance/idea how to achieve that?

The only idea I had was to:

However that would lead to dirty commit history on repo 2. Well I could also remove all the new user's old commits, but that increases the complexity might be error prone.

Upvotes: 2

Views: 310

Answers (2)

luboskrnac
luboskrnac

Reputation: 24591

Unfortunately Travis CI doesn't provide this feature. There is feature request for it, but wasn't approved yet, so it's not even on roadmap so far.

This is reason why I switched to similar service: drone.io. It's relatively new so some languages are in beta so far. Don't know if it is option for you. It provides more features than Travis CI,

One of them is HTTPS hook for remote triggering the builds. So you can configure repo1 Drone job to hit build hook of repo2. This can be done via wget command (You need to wrap repo2 hook URL into double quotes).

Upvotes: 1

joshua-anderson
joshua-anderson

Reputation: 4466

Sorry, It's not possible to do that right now, as you can only start a travis-ci build on a commit at the moment.

Obviously not ideal, but you can, however, in repo 2, clone git repo 1, run the repo 1 unit tests in repo 2, and if they fail stop the repo 2 unit tests from running and end the build.

Upvotes: 1

Related Questions