I would like to be able to define some groovy methods in my declarative Jenkinsfile and call as needed from a script {} section. For example I would like to define some methods that extract git commit information from the jenkins API and use when notifying concerning build status from one of the pipeline post conditions. Is it possible to define methods in a declarative pipeline?
-- 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/db56ff5f-608f-4e13-97dc-dfb446fff907%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.