I care about the builds of our products and asked me to come up with a way to customize the existing build definition to create different branches as needed.
The build process for this product already has several user steps and actions, and the product has a large number of project files that are built, so it is inefficient to configure a new build definition for each new branch that is created.
The build definition is configured to build from the main section. The goal is to introduce a specific branch (using the workflow argument that can be entered when building the assembly), which will then be created instead of the default main branch, without having to edit the assembly definition.
I have a separate test program that I use to test all of my custom actions and build procedures. In the workflow for this build definition, I added some assembly messages for logging so that I can view the values ββof the variables used in the build process.
I also created a branch based on this test program, ready to test the assembly definition, which can be used to build more than one branch
First, I started the assembly for the source files of the test solution project from the source branch, and then I changed the definition of the assembly so that it was done using the new branch and another assembly started. When comparing build logs between two branches, there are only a few minor differences between them. (Logging Verbosity is set for diagnostics)
1st difference. I looked at the Workspace variable, and the Folders property of the assembly refers to their respective branches, in particular the ServerItem property of the Folders property
The second difference - Created project files (BuildSettings.ProjectsToBuild) come from the corresponding branches
I have not seen any other differences between the two build logs other than these
The main question is here :
Is there a standard way to replace branches built to define a single assembly?
If not, is it possible to simply change all the links to the default Main branch in a custom workflow template (in Workspace and BuildSettings.ProjectsToBuild) to the entered branch when the build is in order?
As always, well in advance for any help.