I have a repo that has 2 subfolders $/Repo/project and $/Repo/thirdparty. I need to pull both of those into Jenkins for a single build. Naturally I tried just pulling $/Repo, but this gives me a bunch of other projects along with false polls (it will build every time ANYTHING is checked into $/Repo). I have tried using the multi-scm plugin which works, but does not save the configuration (annoying, but not unusable). I tried using the regular tfs plugin and manually putting the calls for the other repo into a windows command (this did not work even through i bound them them to different folders).
What is the best way to approach this? Some sort of subjob that pulls third party? Fix the multiple scm plugin? Is there some tfs command or trigger to pull a different repo when you pull a project?
I was able to get this working with a job pipeline. It's kinda hacky, but it works.
The program I'm trying to build uses $/Department/Framework/Main
(as workspace\Framework
), and $/Department/Products/TheProgram/Main
(as workspace\TheProgram
).
I created three jobs in Jenkins, each "downstream" of the other:
$/Department/Framework/Main
. No build step.$/Department/Products/TheProgram
. No build step.TheProgram-Build's first build step is a windows batch command:
REM ==================================== REM First Get the Framework folder: rmdir /s/q Framework mkdir Framework xcopy /y /q /e ..\..\Framework-Get\Workspace\Framework Framework REM ==================================== REM Then Get the TheProgram Folder: rmdir /s/q TheProgram mkdir TheProgram xcopy /y /q /e ..\..\TheProgram-Get\Workspace\TheProgram TheProgram
The second build step was a simple call to ant. But you could use msbuild or whatever you like here.
The TFS pluging for Jenkins currently does not support checking out the sources from multiple locations. multiple-scm-plugin might be the answer, but as You pointed out in the question - it's really not an option at this point. There are really, as far I can see it, only to possible solutions for you to test out:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With