Call a declarative pipeline from within a declarative pipeline?

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

Call a declarative pipeline from within a declarative pipeline?

Michael Carter
Before I start looking at some hacky way to do this.

Can I define a declarative pipeline script in my jenkins job.  Then after the git download... call one from the git clone and run it?

Is there something to do this out there?  A plugin or command?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/a232dbc2-8a1a-44fc-8ede-15daabf3dd9en%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Call a declarative pipeline from within a declarative pipeline?

Brian Thompson-2
You could create a shared library: https://www.jenkins.io/doc/book/pipeline/shared-libraries/

Unless you have a very specific reason for doing what you're describing, shared libraries are the way to go.

On Thursday, November 19, 2020 at 2:20:11 PM UTC-6 [hidden email] wrote:
Before I start looking at some hacky way to do this.

Can I define a declarative pipeline script in my jenkins job.  Then after the git download... call one from the git clone and run it?

Is there something to do this out there?  A plugin or command?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/9634e49e-b4a4-4961-b5ac-664c4302f761n%40googlegroups.com.