I am working on a build controller ot assist in the management of builds and deployments. In this process, it is necessary for me to specify the changeset number for the build. In the Build Configuration, when doing this manually, it is identical to setting the "Get Version" parameter in Process | Advanced.
When I set this value in the UI, I can then modify it when I get the build definition. The modification which I make causes the build to work as expected.
When Get Version is left blank, and I repeat the test, loading the params via code, I always get the latest version, as though the changeset is not being specified.
Here is my code:
foreach (IBuildDefinition def in BuildDefinitions.SelectedItems)
{
var process = WorkflowHelpers.DeserializeProcessParameters(def.ProcessParameters);
process.Add("GetVersion", "C1111");
// process["GetVersion"] = "C1133";
def.ProcessParameters = WorkflowHelpers.SerializeProcessParameters(process);
IQueuedBuild result = buildServer.QueueBuild(def);
}
It appears that the build definition may contain a different value between the two cases, but I am unable to locate it.
What am I missing?