0

I am using Jenkins with my Linux box. I have two bitbucket repositories. I am trying to create a Jenkins pipeline.

  1. Repo_A - Jekinsfile resides here.
  2. Repo_B - Project's source code resides here.

I want Jenkins to take configurations (Jenkinsfile) from Repo_A. Also, I want Jenkins to clone my source code to /some/random/directory. The credentials are stored in Jenkins, and can be used for both repos.

How can I use multiple repos in a single pipeline? Can somebody please tell me how to do this?

torek
  • 448,244
  • 59
  • 642
  • 775
Alfred
  • 21,058
  • 61
  • 167
  • 249
  • It is somewhat unclear what you are asking, but normally you specify the `Jenkinsfile` repo and path inside the project configuration, and then your `Jenkinsfile` normally retrieves the source code within the pipeline. Everything it seems you are asking for is normal use case behavior, but with a MCVE someone could probably give you a good answer on how specifically to do it. – Matthew Schuchard Aug 17 '21 at 11:11

1 Answers1

0

You need to use ssh authentication, it is suported by Genkins Here is similar question: how to setup ssh keys for jenkins to publish via ssh

To add new repository enter image description here

enter image description here

BASKA
  • 311
  • 4
  • 15