I haven't tried that and don't know the plugin, but I think you need to find descriptor first since I've found global.jelly for DetectPostBuildStep (https://github.com/jenkinsci/blackduck-detect-plugin/blob/master/src/main/resources/com/blackducksoftware/integration/detect/jenkins/post/DetectPostBuildStep/global.jelly) I would risk and say it may be that one: https://github.com/blackducksoftware/blackduck-detect-plugin/blob/9993e4a22bf375c11d1872e4d619b83940b7e777/src/main/java/com/blackducksoftware/integration/detect/jenkins/post/DetectPostBuildStepDescriptor.java
you can see there are public setters in it, so getDescriptor for com.blackducksoftware.integration.detect.jenkins.post (I guess) and use it to call setters does it make sense to you? In the future, hopefully, Jenkins Configuration as Code Plugin will be able to take care of that for you :) On Monday, March 26, 2018 at 5:50:54 PM UTC+2, Sabyasachi Das wrote: > > Hi All, > > I have installed Blackduck detect plugin in jenkins. I want to do > Blackduck detect configurations via groovy script. > > I am able to do using GUI Manage Jenkins -> configure system but need to > do similar activity via groovy script. > Similar configurations for other plugins can be done for example below. > But for BlackDuck detect I cant find any appropriate class to provide. > https://github.com/blackducksoftware/blackduck-detect-plugin > > Anyone please help me on this. > > Thanks, > Sabya > > Sonar Script > ========================== > import jenkins.model.* > import hudson.plugins.sonar.* > import hudson.plugins.sonar.model.* > import jenkins.plugins.slack.SlackNotifier > import jenkins.plugins.git.GitSCMSource > > def inst = Jenkins.getInstance() > > def desc = inst.getDescriptor("hudson.plugins.sonar.SonarPublisher") > //or slack or git > def slack = instance.getDescriptor(SlackNotifier) > def gitPluginSetup = instance.getDescriptor(GitSCM) > -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d212afef-0aec-4d39-bff6-d78aa4906d6c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.