Re: How to call a function defined within my Jenkinsfile

2017-03-22 Thread David Karr
On Wed, Mar 22, 2017 at 2:18 AM, ishan jain wrote: > @David can you please elaborate what do you mean by main body of the script > ? I guess you can ignore that point, as Cuong Tran indicates that is not the case. I did say that I wasn't sure about that. > I did try adding print statements to s

Re: How to call a function defined within my Jenkinsfile

2017-03-22 Thread ishan jain
@David can you please elaborate what do you mean by main body of the script ? I did try adding print statements to see if it is getting there. All the code samples i have pasted in my post would result in successful execution but no output, even when i have some in the function. Not sure what i

Re: How to call a function defined within my Jenkinsfile

2017-03-21 Thread Cuong Tran
You can call any function the normal way: *stage (build) {* * buildProject(meta)* *}* *def buildProject(meta) {* * node {* * //whatever i need to do* * }* *}* On Tuesday, March 21, 2017 at 10:02:34 AM UTC-7, ishan jain wrote: > > Probably i am being silly, but seriously i

Re: How to call a function defined within my Jenkinsfile

2017-03-21 Thread David Karr
On Tue, Mar 21, 2017 at 10:02 AM, ishan jain wrote: > Probably i am being silly, but seriously i am not able to call a function > which i have defined in my Jenkinsfile from within a step. Here is a sample: > > def meta = "something" > > stage (build) { > > buildProject(meta) > } > > def bui

How to call a function defined within my Jenkinsfile

2017-03-21 Thread ishan jain
Probably i am being silly, but seriously i am not able to call a function which i have defined in my Jenkinsfile from within a step. Here is a sample: *def meta = "something"* *stage (build) {* * buildProject(meta)* *}* *def buildProject(meta) {* *return {* * node {* * //wha