finding git repo url

12 views
Skip to first unread message

R Srinivasan

unread,
Jul 1, 2017, 7:45:16 AM7/1/17
to Jenkins Users
For Multibranch pipeline jobs,

how do I clone the git Repo? I can find what the branch is but not the git url! Environment variable GIT_URL does not appear to be populated.

Can someone please suggest a way?

thanks, srini

Daniel Butler

unread,
Jul 1, 2017, 9:40:00 AM7/1/17
to jenkins...@googlegroups.com

In a multibranch project you simply do:
checkout scm

And that clones/checks out the current branch.

 

Cheers,

Daniel Butler

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5cea8c76-d2f2-4fe8-8f35-5307ab298604%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Mark Waite

unread,
Jul 1, 2017, 9:43:32 AM7/1/17
to jenkins...@googlegroups.com
Declarative pipeline is even easier than that.  It performs the checkout scm implicitly.  Try declarative pipeline.

R Srinivasan

unread,
Jul 1, 2017, 1:08:04 PM7/1/17
to jenkins...@googlegroups.com
thanks a bunch. will try all suggestions.

On Sat, Jul 1, 2017 at 9:39 AM, Daniel Butler <danielsi...@gmail.com> wrote:

In a multibranch project you simply do:
checkout scm

And that clones/checks out the current branch.

 

Cheers,

Daniel Butler

 

From: R Srinivasan
Sent: 01 July 2017 12:45
To: Jenkins Users
Subject: finding git repo url

 

For Multibranch pipeline jobs,

 

how do I clone the git Repo? I can find what the branch is but not the git url! Environment variable GIT_URL does not appear to be populated.

 

Can someone please suggest a way?

 

thanks, srini

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

 

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/zhvWR3GT7rk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5957a618.c288df0a.f9b2b.28e7%40mx.google.com.
Reply all
Reply to author
Forward
0 new messages