Pointing Your New Build Definition to a Different Branch
But, skipping the branching discussion for second, if you do use branches, how do you deal with builds? Well, that is really easy. You clone the existing definition, change the repository mapping and change the build task to point to the correct folder's project file!
Step 1: Clone the original build definition
Click on the ellipsis (...) next to the build definition's name in your build definition list, and click "Clone".
Step 2: Change the repository mapping
Cloning should copy the original definition and open it for editing. On the "Repository" tab, change the "Mappings" to point to your new Server Path for your branch. (this screenshot shows trunk/main still, change that to what you need).
Step 3: Change the project file location in the build tasks
On the "Build" tab, select the "Build the solution" task and edit the project location. I advise to use the browse feature by clicking the ellipsis, to make sure you don't mistype.
Step 4: Save & Run!
That's it! Make sure to save your changes, and on the save dialog give the new build definition a proper name. At this point you can create multiple build definitions for the branches. You can play with setting for example any dev branches as gated builds or nightly builds, change the build numbering to clearly distinguish between builds from different branches, etc. Go wild!
Cool. This must be the shortest post I've done in years! Happy building!
与本文相关的文章
- 用符号调试问题:错误还是功能? / Debugging woes with symbols: bug or feature?
- 重新发布:将构建定义指向特定VM(代理)/ Repost: Pointing Build Definitions to Specific VMs (agents)
- 重新发布:在Visual Studio和自动构建中启用X ++代码覆盖率 / Repost: Enabling X++ Code Coverage in Visual Studio and Automated Build
- 查询函数:SysQueryRangeUtil 扩展 / Query Functions: SysQueryRangeUtil Extensions
- 改变思维定势-转向扩展 /Moving to Extensions is Changing Your Mindset
- 包和模型 / Beating the Drum on Packages and Models