问题
I have a plugin that I would like to call from a pipeline Jenkinsfile, but the plugin does not have pipeline support so it does not show up in the snippet generator.
Is it still possible to use this plugin with a pipeline job; if so, how?
Specifically, the plugin I'm trying to use is the Nexus IQ plugin.
回答1:
No.
From a Pipeline job you could use build('job-name')
to build a Freestyle job which uses that plugin.
But unless the plugin has added Pipeline support (which is usually pretty simple), you can't use it in a Pipeline job.
Given that this particular plugin is closed-source, and still appears to be compatible with Hudson(!), there might not be much hope. You'd have to ask the plugin maintainers to add support.
来源:https://stackoverflow.com/questions/39903815/how-to-use-jenkins-plugins-with-no-pipeline-support