postBuildTask is not working

16 views
Skip to first unread message

sdu...@simscale.com

unread,
Jun 7, 2017, 9:10:52 AM6/7/17
to job-dsl-plugin
I using the following script. It runs without any errors but doesn't produce the required results. No post build script is added to the generated job. I don't understand what is going wrong in this.

job('dsl-test-job') {
    scm {
        git {
            remote {
                url("some url")
                credentials("some key")
            }
            branch('master')
            extensions {
                cleanAfterCheckout()
            }
        }

    }
    steps {
        maven{
           goals('-e clean test')
           mavenInstallation('latest')       
        }
        publishers {
            postBuildTask {
                task('SUCCESS', 'echo hello')
            }
        }
    }
}

József bognár

unread,
Jun 12, 2017, 10:38:37 AM6/12/17
to job-dsl-plugin
Hello,

As far as i know the publisher part should be on the same hierarchy level as steps. So i think it should work that way:

József bognár

unread,
Jun 12, 2017, 10:39:12 AM6/12/17
to job-dsl-plugin


2017. június 7., szerda 15:10:52 UTC+2 időpontban sdu...@simscale.com a következőt írta:

József bognár

unread,
Jun 12, 2017, 10:39:34 AM6/12/17
to job-dsl-plugin


2017. június 7., szerda 15:10:52 UTC+2 időpontban sdu...@simscale.com a következőt írta:
Reply all
Reply to author
Forward
0 new messages