8

I have Selenium project and i want to run my job on local Jenkins 2.176.1 from local repository (using path to my project folder on disc).

Do You know where's that option? I remember that I use this option few months ago, but now I can't find box for path to files on disc.

Now I only see git/subversion option.

[enter image description here]

2 Answers 2

5

Linking-jenkins-local-git-repository.

Go to Source Code Management tab and select Git

enter image description here

The critical part is what you enter here as the “Repository URL”. The correct value should start with file://// for a local repository which is created on your PCs local file system.

For a test project which was created under “/usr/local/projects/reporting-servicet” the Repository URL should be entered as “file:////usr/local/projects/reporting-service”.

Now save this configuration, go to “Jenkins” dashboard (http://localhost:8080/) and click your projects name on the right

1
  • How is this different than what the original question had tried?
    – trebor
    Jan 8, 2021 at 23:59
1

@Sunny Sharma's answer works well for a local git repository. I setup a Multibranch Pipeline Project, added the following into Branch Sources > Git > Project Repository

file:///<path-to-local-git-repository>
or simply w/o file:///
<path-to-local-git-repository>

Where file:/// or file://// both are working for *nix style forward slash path. Even though you're using a local git repository, any changes you made needed to be committed locally first in order to let Jenkins check out and pick them up. Validated on Jenkins 2.263.4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.