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!
- 改变思维定势-转向扩展 /Moving to Extensions is Changing Your Mindset
- 包和模型 / Beating the Drum on Packages and Models
- 代码扩展 / Accidental Code Extensions
- 安装修补程序 – 准备vs应用 / Installing Hotfixes – Prepare vs Apply
- PSA: AX7 生成 Packages / Model 导出时编译错误 / PSA: AX7 Build Failure on Generate Packages / Model Export
- Upgrades, Updates and Hotfixes in AX7