0

I am a bit new to CI (Continuous Integration)/CD (Continuous Delivery) topics. I am currently using TFS for CI and CD. There I found there are a lot of custom build process (eg. Running certain powershell scripts, copy files, etc). In my solution, there are a lot of branches that is developed by various developers at the same time. I am using Git as Version Control as well.

The problem : I have seek advice from some of my team members for debugging their projects in local development environment as I have been moving between topics from time to time. And what they suggested is to manually repeat the whole build process manually for my debugging purpose which somehow i feel tedious and unproductive in a way because there are a lot of steps I need to replicate here and there.

My question: Is there a way which can simplify all these tedious process? Maybe creating a build branch in GIT helps? But creating another build branch also may have it's own risks where you need double effort to sync the build process between the build server and the build branch that you created?

I'm not sure what's the best way to go here and requires some guidance or links that are related to this problem.

Thank you.

UnBroKeN
  • 25
  • 2
  • 11
  • So the build steps are different for different branches? – Eddie Chen - MSFT Dec 26 '17 at 02:38
  • Yeah, different branches are used for different features, so the build steps are quite unique for some of them. One of the branch that i encounter currently, requires tedious amount of copy files over places and I found it very tedious to reproduce the same steps in a debug environment and it's quite time consuming to understand each build steps there. However, it does makes sense to be placed within that solution because the workflow is related to it, we just have different build definitions which enable/disable build for some of these "unique" projects. – UnBroKeN Dec 27 '17 at 03:38
  • Check YAML Build: https://learn.microsoft.com/en-us/vsts/build-release/actions/build-yaml – Eddie Chen - MSFT Dec 27 '17 at 08:36

1 Answers1

-1

It's based on how do you want to debug the projects.

When should the team add a branch?

  • You should create branches in the following situations: When you must release code on a different schedule/cycle than the existing
    branches.
  • When your code requires a different branch policy. If you create a new branch that has the new policy, you can add strategic value to
    your project.
  • When functionality is released to a customer and your team plans to make changes that do not affect the planned release cycle.

You should not create a branching for each user story because it creates a high integration cost. Although makes branching easy, the overhead of managing branches can become significant if you have many branches.

SOURCE HERE: https://learn.microsoft.com/en-us/vsts/tfvc/branch-strategically#when-should-the-team-add-a-branch

If you just want to duplicate the same build process, then you can clone the build definition and release definition, then trigger the cloned build/releae definitions separately.

Generally, for TFVC you can enable the Gated Check-In for your build definition, thus it will automatically trigger the build and the changes will not be checked in once the build failed.

For Git, you can also set the branch policy to achieve that: Improve code quality with branch policies. Also reference this article : Gated Check-ins in Visual Studio Team Services using TFSVC and Git

For debugging, you can set the variable system.debug to true, see here for details.

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55