On Mon, Jun 13, 2016 at 4:04 AM, Krishnakumar S <[email protected]> wrote:
> def custom_class = new CustomClass(currentBuild.getRawBuild())
> echo "starting Master"
> custom_class.test_log()
> echo "Test Echo"
>
>
> CustomClass, logger is defined as below.
> class CustomClass {
> def jenkins_logger
>
> CustomClass(rawbuild) {
> this.jenkins_logger = rawbuild.listener.getLogger()
> }
> def test_log(msg) {
> this.jenkins_logger.println(msg)
> }
> }
Too much effort, and cannot be made to work this way anyway.
class CustomClass {
Script script
def whatever() {
script.echo 'hello'
}
}
…
new CustomClass(script: this).whatever()
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" 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-dev/CANfRfr1%2BUZOC5WSbfDoXK%3DLDcHJEGh2vXYk-QkGigSyh8sG8qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.