Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50114

Can't use job-dsl to create groovy script jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • job-dsl-plugin
    • None
    • Using docker jenkins:lst:alpine
      Jenkins version 2.89.4

      If I try to use job-dsl to create a job with a groovy script step, using the DSL script below, it doesn't work. The created job doesn't even show the groovy script step on the jenkins interface, but the config.xml shows the information. 

      job('example2') {
        steps {
          groovyCommand(' println "test" '){
            groovyInstallation("groovy-2.4.9")
          }
        }
      }

       

            daspilker Daniel Spilker
            thiagohk Thiago Kafouri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: