0

The JobDSL spec currently has:

job {
  steps {
    gradle('build')
  }
}

but that creates a job that errors with:

FATAL: Unable to find Gradle Wrapper

How does one specify the Gradle wrapper to use? I don't see it documented in https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-reference#gradle.

Noel Yap
  • 18,822
  • 21
  • 92
  • 144

1 Answers1

3

It's not a standard thing to do, you have to escape out to a configure block:

  job {
    steps {
      gradle('clean build', '--info --refresh-dependencies', true) {
          it / wrapperScript('$NEBULA_HOME/gradlew')
      }
    }
  }
Justin Ryan
  • 2,413
  • 1
  • 15
  • 5