Accessing steps section - https://jenkins.io/doc/book/pipeline/shared-libraries/#accessing-steps is actually a better section to look at to understand our use case.
Specifically this section: "This approach has limitations; for example, it prevents the declaration of a superclass. Alternately, a set of steps can be passed explicitly to a library class, in a constructor, or just one method" I'm passing the steps instance to a method in a library class. On Friday, September 8, 2017 at 9:30:26 PM UTC-7, Ann B wrote: > > Hi Richard- > > Thank you for your work with this plugin! > > Yes, publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, > keepAll: false, reportDir: 'results', reportFiles: 'report.html', > reportName: 'HTML Report', reportTitles: '']) works find within the > context of a shared library script in src directory. > > My issue is that I've created a custom step (global variable) within the > var directory of my shared library. The way I understand it, you have to > access the DSL via the steps object. This page has more information - > https://support.cloudbees.com/hc/en-us/articles/217736618-How-do-I-access-Pipeline-DSLs-from-inside-a-Groovy-class- > > as well as this page - > https://jenkins.io/doc/book/pipeline/shared-libraries/#defining-global-variables > > If I code: > publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: > false, reportDir: 'results', reportFiles: 'report.html', reportName: 'HTML > Report', reportTitles: '']) in my method in my class in my var directory, > then I get the following error: > *hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No > signature of method: org.magento.ci.tests.Functional.publishHTML() is > applicable for argument types: (java.util.LinkedHashMap) values: > [[allowMissing:false, alwaysLinkToLastBuild:false, keepAll:false, ...]]* > > Thanks again, > > Ann > -- 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/261699f8-b0c8-4926-8de7-5db65461df55%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
