We have the same need, tried some hacky stuff (failed), and asked about it on the #jenkins IRC channel, but it seems to not currently be possible to use this plugin in a declarative pipeline project.
Indeed, the documentation only mentions Freestyle, Multi-configuration, or Maven as the explicitly-supported project types. Even so, when attempting to use it as documented I seem to run into JENKINS-49819, so I'm completely blocked from using this plugin at all.
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.