Reputation: 4229
I setup Jenkins for a CI server and everything seems to be working great. So I thought I would install the Chuck Norris Plugin for some humor. I installed the plugin using the plugin manager but I don't see the option to activate it.
Has anyone done this is there a dependency I need to install to get this to work?
Upvotes: 9
Views: 7057
Reputation: 131
Activating the Chuck Norris plugin in a pipeline is slightly more tricky. I use this method of doing it in my groovy pipeline code:
node('my-build-node') {
try {
stage('First stage') {
// stage steps
}
stage('Second stage') {
// stage steps
}
// etc. for as many stages as you want in the try block
} finally {
// Call Chuck Norris
step([$class: 'CordellWalkerRecorder'])
}
}
By putting the call to the Chuck Norris plugin in the finally section, it will be called for success or failure, so you always get wisdom from the Great Man himself.
Upvotes: 1
Reputation: 4229
I just had to activate the plugin after I installed it. Most plugins I have used automatically activate. I'm not sure why this one didn't. But that was the fix.
Upvotes: 0
Reputation: 793
You can activate it on the job configuration page. Select "Add post-build action" -> "Activate Chuck Norris".
Upvotes: 25
Reputation: 6515
Just run next script in jenkins script concole (http://your_server/jenkins/script
or Manage Jenkins > Script Console):
import jenkins.model.*
for(item in Jenkins.instance.items) {
println("job $item.name")
item.publishersList.replace(new hudson.plugins.chucknorris.CordellWalkerRecorder());
}
Upvotes: 1