Some plugins may not have a @Symbol annotation, or explicit pipeline step implementation. If they don't, but do implement SimpleBuildStep, then they will show up usable under step(). The @Symbol allows for a more symbolic usage of the step in pipeline scripts. Otherwise, the plugin has to implement a separate pipeline step class an provide an implementation of a method which returns the shorthand for executing the step. Pipeline support in plugins is still something that needs work, there are many plugins that don't implement the correct functions.
On Sun, Aug 20, 2017, 10:37 red 888 <[email protected]> wrote: > So I'm dumb I can see the xunit plugin under the "step: General Build > Step". Still confused why some plugins use this and some don't. For > example cleanWs doesn't use step but wsCleanup does and they seem to do the > exact same thing? > > > On Sunday, August 20, 2017 at 1:00:00 PM UTC-4, red 888 wrote: >> >> I noticed the xunit plugin and wscleanup don't appear in the Sample Step >> drop down of the snippet generator. >> >> This is how I use them in my jenkinsfile: >> >> step([$class: 'WsCleanup']) >> >> >> step([$class : 'XUnitPublisher', >>> testTimeMargin: '3000', >>> thresholdMode: 1, >>> thresholds: [ >>> [$class: 'FailedThreshold', failureNewThreshold: '', >>> failureThreshold:'2', unstableNewThreshold: '', unstableThreshold: ''] >>> ], >>> tools : [[$class: 'MSTestJunitHudsonTestType', >>> deleteOutputFiles: true, >>> failIfNotNew: false, >>> pattern: "\\TestResults\\*.trx", >>> skipNoTestFiles: false, >>> stopProcessingIfError: true >>> ]] >>> ]) >> >> >> Does this have something to do with the fact that they are called with >> step()? Im not really even sure what step() is or why its necessary for >> them to work. Is this because they don't actually have 100% declarative >> pipeline support yet? >> >> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/18d4bdf9-fee3-47c9-b2de-b765d05e1213%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/18d4bdf9-fee3-47c9-b2de-b765d05e1213%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVcMLwB%2BEJAY6_fC7UoRqgMgE7hCdPcUqNxyRUgbiMWxfw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
