Thank you soo much for your help. I agree with you but my company is still using jenkins1.609 with old plugins and we cant upgrade it, that’s why we all have to face such type of issues everyday
I just have one doubt, even when I’m trying this-
slackSend teamDomain: "mycompany", channel: "#re-build", message: " Please Ignore ", tokenCredentialId: "slack-rebuild"
I still get the previously mentioned error. Is there any way to explicitly mention your slack credentials, so far I tried this -
WithCredentials([string(credentialsId: 'theSlackToken', variable: 'slackCredentials')]) {
slackSend (channel: '@johnsmith', message: 'hello there', color: '#3eb991', failOnError: true, teamDomain: 'myteamsubdomain', token: slackCredentials)
}
But when I copy paste these above lines in my Jenkinsfile I get error saying no such DSL method string.