Click here to Skip to main content
15,558,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I wrote a pipeline in DSL where I have variables as:

def mailidlist ="${mailid}"
def bemailidlist="${BEmailid}"
def pmailidlists = "${Pmailidlist}"


Then I am using same variables in property/parameters:
properties([
  parameters([
    gitParameter(branch: '', branchFilter: 'origin/(.*)',  description: 'Provide the ...', name: 'sourceBranchName', quickFilterEnabled: false, selectedValue: 'NONE', sortMode: 'NONE', tagFilter: '*', type: 'PT_BRANCH'),
    choice(choices: ['dev'], description: 'DEV', name: 'deploymentEnv'),  
    text(description: 'Provide Email Address of the product owner to be notified', name: 'PmailidList'),
    text(description: 'Provide Email Address of the people to be notified', name: 'mailid'),
    text(description: 'Provide Email Address of the peoplefor B Failures', name: 'BEmailid'),
    ])
])


Now while calling the function under node windows node , I would call without any arguments:
node(windowsNode) {
nslookup()
createmailerlist()
}


Below is the function definition for createmailerlist() function:
<pre lang="Groovy">void createmailerlist() {
        echo mailidlist
stage('Generate mail List ') {
if(!((currentBuild.result).contains('UNSTABLE'))) {
mailidlist = mailidlist + ";" + pmailidlists
}
echo 'Notify to users - '+ mailidlist
}
}


But it does not executes and throws error as :

[Checks API] No suitable checks publisher found.
java.lang.NoSuchMethodError: No such DSL method 'createEmailList' found among steps
[ArtifactoryGradleBuild, MavenDescriptorStep, addBadge, addEmbeddableBadgeConfiguration,
addErrorBadge, addHtmlBadge, addInfoBadge, addInteractivePromotion, addShortText,
addWarningBadge, ansiColor, ansiblePlaybook ....


What I have tried:

I also tried to define the function with arguments but still no luck :
void createEmailList(String mailidlist,String pmailidlists)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900