Reputation: 19870
Currently I have a canary build that builds code and runs tests, but doesn't "publish" anything. It is just a way to make sure that a checkin doesn't break the build.
I have a second build that is the "Publish" build that builds and publishes (at this point it does not do tests because it assumes that the canary build validated tests). This publish build runs every night IF there are changesets in the queue. But I'd like to prevent the publish build from running if the last canary build broke as well. How can I do that?
Publish build:
Schedule build at 1am and run:
a. IF there are changesets in the queue AND
b. IF the last Canary build succeeded.
Upvotes: 1
Views: 1367
Reputation: 10080
Is your build process too time consuming? If not why not do a build right before publishing? There by you dont have to check the CI build output?
It's easy and you dont need any extra effort :)
Upvotes: 0
Reputation: 1169
There's no way to check another build fails or not in the default process template unless you create a custom template like this one http://blog.stangroome.com/2011/09/06/queue-another-team-build-when-one-team-build-succeeds/
Why don't you include the unit tests in the publish build, what ever the size of the change set I guess the unit test is going to run once and i guess it's not going to take more time. So you can change the flow
Publish build:
Schedule build at 1am and run:
a. IF there are changesets in the queue AND
b. IF the build succeeds and unit test passes.
Upvotes: 0
Reputation: 16685
Have you thought about changing your 'canary' build to a gated check-in, which will prevent any code from getting into the code base unless the build succeeds.
Then, set your nightly build as a schedule (which I imagine you already have), but just uncheck "Build even if nothing has changed"
Upvotes: 3