Workflow- step struct way to display

9 views
Skip to first unread message

Nikhil Bhoski

unread,
May 14, 2020, 2:16:24 AM5/14/20
to Jenkins Developers
Hi ,

I am developing pipeline solution by extending Step class now my step looks something like below when i write DSL to invoke it. 

pipeline {
    agent any
    stages{
        stage('Run Tests') {
            steps
            {
               
                        RunMyTests(
                                        tapChkBx:true,
                                        junitChkBx:true,
                                        coberturaChkBx:true,
                                        stmResultsChkBx:true,
                                        modelCoverageChkBx:true,
                                        pdfReportChkBx:true
 
                                       )
                }
                 
            }
                  
        }
    }
}


now can implement my step to be invoked without brackets "()" and rather with "{}"  i want it to be invoked like as shown below.

pipeline {
    agent any
    stages{
        stage('Run Tests') {
            steps
            {
               
                        RunMyTests {
                                        tapChkBx:true,
                                        junitChkBx:true,
                                        coberturaChkBx:true,
                                        stmResultsChkBx:true,
                                        modelCoverageChkBx:true,
                                        pdfReportChkBx:true
 
                                       }
                }
                 
            }
                  
        }
    }
}


Regards
Nikhil 

Jesse Glick

unread,
May 14, 2020, 10:58:39 AM5/14/20
to Jenkins Dev
On Thu, May 14, 2020 at 2:16 AM Nikhil Bhoski <nikhil...@gmail.com> wrote:
> now can implement my step to be invoked without brackets "()" and rather with "{}"

You cannot.
Reply all
Reply to author
Forward
0 new messages