问题
I am having powershell task with the following commands in my pipeline which is running using custom agent pool.
$TFFile = "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe"
$mergeCommand = " merge $/MyProject/dev $/MyProject/test /recursive"
Start-Process "$TFFile" "$mergeCommand"
$comment = "Automated merge check-in"
$CheckinToTarget = " checkin $/MyProject/test /comment:$comment /recursive /noprompt"
Start-Process "$TFFile" "$CheckinToTarget"
The pipeline is successfully running. But the changes in source branch is not merged with target branch. Please let me know what is missing in this scripts.
回答1:
I am posting this solution to help others who are facing the issue like me. Using /loginType:OAuth with the command solves my issues.
来源:https://stackoverflow.com/questions/60448133/tf-merge-command-in-powershell-script-task-is-not-working