4
votes

I'm trying to make Jenkins pull TFS gated checkin code but failed to do so.

I have managed to add a Jenkins build step in TFS, This build step is a "trigger" to start a build job in Jenkins, This job taking the source code from TFS and compile it, the problem is that this code is without the gated checkin.

For example:

  1. My code base is "A" and compilation is working.
  2. I'm pushing new change (lets call it "B" delta) that should break the build (invalid c# syntax).
  3. This trigger a build in TFS which call Jenkins job, this job taking only "A" code (without "B" delta).
  4. Jenkins succsusfully building the code (base only on "A") which TFS then mark this build as succsusfully and let the bad "B" delta code inside.
  5. Now every change set including a fix to this one will cause the next build to break because jenkins will take the bad "B" code and always fail.

Is there a way to make Jenkins take the code with the current gated checkin?

The reason I want to use Jenkins build instead of TFS is that the build process for .Net Core 2.0 in Jenkins is about X4 faster then TFS, and our source control is managed in TFS.

Using: TFS - Version 15.117.26714.0

1

1 Answers

1
votes

To avoid this issue, you could add a VS Build task before queue Jenkins Job task:

enter image description here