0

When creating a new item in Jenkins (Freestyle), one can choose more than one Git repositories under "Source Code Management".

I want to create a post-build action to archive files from two repositories as artifacts. I clicked on "Advanced..." on each repo in order to give each repo a name, but still when I check the workspace I see only the latest repo there.

Any tips on how can I see both repos on the workspace?

francisaugusto
  • 1,077
  • 1
  • 12
  • 29

1 Answers1

5

It's recommended to switch to Pipeline Project inside of Freestyle to support check out sources from multiple SCM providers (example). Otherwise, if you keep using Freestyle project you can use this plugin Multiple SCMs Plugin.

  • Thanks Houssam. But I wonder why is it so that one can add multiple repos on the freestyle, if one cannot reach them. – francisaugusto Jan 29 '19 at 08:55
  • 2
    It's normal because your SCMs work in the same directory. In "Source Code Management" and under each Repo click on "Additional Behaviors" and choose "Check out to a sub-directory" and provide a name of each sub-directory. – Houssam Rafiki Jan 29 '19 at 09:17