continuous-integrationfinalbuilder

Continua CI: How to ReUse Configuration? (DailyBuild + Release)


I have the following problem and unfortunately nothing found on the Internet.

I use Continua CI as BuildServer. I have a configuration as DailyBuild.

Now a release with Continua CI is to be created. Basically, the actual build process would be the same as the DailyBuild, it would just have to start other configurations before.

Is this possible?

Configuration release would be so Config 1 + Config 2 + DailyBuild Config

Do I have to recreate the three configurations exactly (error source) or is there another possibility?

What's your structure for DailyBuild, Patch and Release on BuildServer?

I hope you can help me or show me new ways to implement this.

Thanks!


Solution

  • You can use Build Completed Triggers to start one configuration, when another has finished. There isn't, however, currently any way to start another configuration, and wait for it to complete, when one configuration starts. A dependencies feature is planned to make this possible in the future.

    I would recommend that you use one single Configuration with a Stage for each part of your build process. You can then use stage Skip Conditions, stage Promote Conditions or If and Else actions to select which stages or actions are run based on the values of variables and expressions.

    I assume that the DailyBuild would be started by a Time Trigger, and the Patch and Release builds would either be started manually or by a Repository Trigger. Maybe the Patch build is triggered by particular repository branch or tag and the Release build is triggered by another. The conditions in the configuration stages could either test the value of the branch or tag e.g. $Source.RepoName.Branch$ Equals 'Release' or $Source.RepoName.LatestTagName$ StartsWith 'Patch', or test the value of a variable. The variable could either be set manually in the Queue Options dialog when running the build or by a trigger as specified in the Variables tab of Edit Trigger dialog.

    In your scenario where you have "Config 1 + Config 2 + DailyBuild Config" for the Release configuration, I would change this to "Stage 1 + Stage 2 + DailyBuild Stage". Stage 1 and Stage 2 would each have the Skip Condition checking a variable set by the DailyBuild trigger e.g. %TriggeredBy% Equals 'DailyBuild', or the value of the $Build.StartedBy$ expression e.g. $Build.StartedBy$ Equals 'DailyBuildTrigger'. This would mean that Stage 1 and Stage 2 would only run if the build was not started by the DailyBuildTrigger.

    Alternatively, you could clone a configuration, and edit it for each build process, but I wouldn't recommend doing this as it is more difficult to make changes and maintain.