I am trying to execute the ReleaseManagementBuild.exe using c# code(using cmd).
I got the following help :-
ReleaseManagementBuild release {[-tfs teamFoundationServerUrl -tp teamProjectName -bd buildDefinitionName -bn buildNumber] | [-rt ReleaseTemplateName -pl PackageLocation [-an AppendComponentName] [-ff FireAndForget]]} [-ts TargetStage]
Where:
-tfs [TFS Mode] URL to the Team Foundation Server. The URL should include the collection if other than default. -tp [TFS Mode] Name of the Team Project for which the build was triggered. -bd [TFS Mode] Name of the Build Definition used for the build. -bn [TFS Mode] Build Number representing the specific build instance that generated the application components to release.
-rt [Package Location Mode] Name of the release template used to create a new release. -pl [Package Location Mode] Package location of the components -ts [Optional] Name of the Target Stage where the release should stop. -ff [Package Location Mode] [Optional] When set to True the command will return without waiting for the deployment in the first stage. Default is False: wait for the result. -an [Package Location Mode] [Optional] In case where the Release Template has component that 'Builds Externally', when set to true, the component name will be appended at the end of the Package Location.
Examples:
ReleaseManagementBuild release -tfs http://localhost:8080/tfs/DefaultCollection -tp "My Project" -bd "QA_Dev_MyApp_Manual" -bn "QA_Dev_MyApp_Manual_20101119.8"
ReleaseManagementBuild release -tfs http://localhost:8080/tfs/DefaultCollection -tp "My Project" -bd "QA_Dev_MyApp_Manual" -bn "QA_Dev_MyApp_Manual_20101119.8" -ts "DEV"
ReleaseManagementBuild release -rt "My Release Template" -pl "//share/drop/version"
ReleaseManagementBuild release -rt "My Release Template" -pl "//share/drop/version" -ts "DEV" -ff False -an True
I want to pass these three parameters to the Build :-
1) Name of the release template used to create a new release. 2) Build Drop location 3) Build number - I usually deploy the Build which is not the latest one.
So my question is how can I release by passing all the three parameters.
Note:- I was able to deploy by following :-
release -rt MY_ReleaseTemplate_RT -pl \\Server\BuildDrop\Dev1\BuildDefinitionName\BuildNumber
But this is giving Build number in Release Management tool as Blank. I want to do the release using package location as I can not set Build definition to auto deploy and also want the Build number to reflect in the Release Management tool.
The build drop location will be automatically determined if you specify a build number; you don't need to specify a drop location. You can specify any build number you'd like, it doesn't have to be the latest build.
Just follow the pattern set in the first example,
ReleaseManagementBuild release -tfs http://localhost:8080/tfs/DefaultCollection -tp "My Project" -bd "QA_Dev_MyApp_Manual" -bn "QA_Dev_MyApp_Manual_20101119.8".There's no other way to get the build number to show up in the release; either the release is tied to a specific build definition and number, or it's tied to a UNC location. It can't be both.
It's also worth noting that RM Server is deprecated. It's time to start planning a migration path to a modern version of TFS and the modern build/deployment capabilities that are present.