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 {*
* //whatever i need to do*
* }*
* }*
*}*
This simply does not do anything. I tried various combos to try n call it,
but nothing. *How exactly should i call a function ?*
*def meta = "something"*
*stage (build) {*
* node {*
* buildProject(meta)*
* }*
*}*
*def buildProject(meta) {*
*return {*
* //whatever i need to do*
* }*
*}*
*def meta = "something"*
*stage (build) {*
* step {*
* buildProject(meta)*
* }*
*}*
*def buildProject(meta) {*
*return {*
* node {*
* //whatever i need to do*
* }*
* }*
*}*
*def meta = "something"*
*stage (build) {*
* def output = buildProject(meta)*
*}*
*def buildProject(meta) {*
*return {*
* node {*
* //whatever i need to do*
* }*
* }*
*}*
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/1cf8438c-7bc4-44f6-9e1d-3f42ee863de2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.