pipeline {
agent any
tools {
gradle "GRADLE_LATEST"
}
stages {
stage('Gradle') {
steps {
sh 'gradle --version'
}
}
}
}
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 4: Invalid tool type "gradle". Valid tool types: [ant, hudson.tasks.Ant$AntInstallation, com.cloudbees.jenkins.plugins.customtools.CustomTool, org.jenkinsci.plugins.docker.commons.tools.DockerTool, git, hudson.plugins.git.GitTool, hudson.plugins.gradle.GradleInstallation, hudson.plugins.groovy.GroovyInstallation, jdk, hudson.model.JDK, jgit, org.jenkinsci.plugins.gitclient.JGitTool, jgitapache, org.jenkinsci.plugins.gitclient.JGitApacheTool, maven, hudson.tasks.Maven$MavenInstallation, hudson.plugins.mercurial.MercurialInstallation] @ line 4, column 9. gradle "GRADLE_LATEST" ^ 1 error
This is on Jenkins Enterprise 2.32.1.1 with version 1.0 of the Pipeline Model plugins installed and with the gradle tool plugin installed and configured.
Has anyone got gradle to work with declarative pipeline?
I think I had it working with scripted pipeline sytax but I prefer this tools section.
Thanks for any help,
Bill
What is “GRADLE_LATEST”?
You need to go Jenkins and install Gradle Plugin then add Gradle to the tool in Jenkins 2.x: Go to Manage Jenkins -> Global Tool Configuration -> Gradle Installation; In Jenkins 1.x: Go to Manage Jenkins -> Configure System -> Gradle
For a Gradle version you install you specify a label and then use that label ex. “Gradle-2.14” in the declarative pipeline
tools {
gradle “Gradle-2.14”
…
}
On the node/agent, you better make sure the Gradle you install also available in the same installation location you just did above.
-Indra
--
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-use...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/e5506ea0-e080-47b3-b885-cba24454ea61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks,
Bill
Nice to know.
Thank you
From: <jenkins...@googlegroups.com> on behalf of Bill Dennis <bill....@gmail.com>
Reply-To: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
Date: Thursday, February 16, 2017 at 9:40 AM
To: Jenkins Users <jenkins...@googlegroups.com>
--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/185dad84-3e2f-42e0-a9f7-3da30bcb2cd9%40googlegroups.com.