"checkout scm+recursiveSubmodules"?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"checkout scm+recursiveSubmodules"?

Cristian Morales Vega
Hi,

I have limited control over the Jenkins instance and I can't configure
it to send me a scm global variable with recursiveSubmodules already
set.

I'm new to Jenkins, don't know Groovy and I'm using a declarative pipeline.

Ideally I guess I would like to put something in my Jenkinsfile to
modify the scm global variable adding recursiveSubmodules if it isn't
already there, before anything else tries to read it. But I don't
think this is going to be possible.

So I'm fine with using skipDefaultCheckout() and explicitly calling
the "checkout" step. But I would like to do it with the contents of
the scm global variable... plus recursiveSubmodules if it isn't
already set.

If the Jenkinsfile hardcodes the supposition that the scm global
variable contains a GitSCM I don't care too much.

Is this possible?

Regards.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAOWQn3RhxchV7_R9AQySahN6zk7ekT6WorXSqXfCOz7vexuVDA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: "checkout scm+recursiveSubmodules"?

Mark Waite-2
If an example is OK, you might refer to https://github.com/MarkEWaite/jenkins-bugs/blob/3b4e8e2a638851b2b7c96abc5a70892836d14b2f/Jenkinsfile#L19 for one way of expressing that in a declarative pipeline.

There are other examples on various branches in that repository if that one is not sufficient

On Wed, Sep 30, 2020 at 9:19 AM Cristian Morales Vega <[hidden email]> wrote:
Hi,

I have limited control over the Jenkins instance and I can't configure
it to send me a scm global variable with recursiveSubmodules already
set.

I'm new to Jenkins, don't know Groovy and I'm using a declarative pipeline.

Ideally I guess I would like to put something in my Jenkinsfile to
modify the scm global variable adding recursiveSubmodules if it isn't
already there, before anything else tries to read it. But I don't
think this is going to be possible.

So I'm fine with using skipDefaultCheckout() and explicitly calling
the "checkout" step. But I would like to do it with the contents of
the scm global variable... plus recursiveSubmodules if it isn't
already set.

If the Jenkinsfile hardcodes the supposition that the scm global
variable contains a GitSCM I don't care too much.

Is this possible?

Regards.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAOWQn3RhxchV7_R9AQySahN6zk7ekT6WorXSqXfCOz7vexuVDA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtE40z3sfdGqniUX-OSjWr_LDtwR75bcX1La4iEdCmxyTA%40mail.gmail.com.