-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
`//START-OF-SCRIPT
node {
def server = Artifactory.server 'artifactory'
withCredentials([usernamePassword(credentialsId: 'artifactory',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
server.username = "${USERNAME}"
server.password = "${PASSWORD}"
}
def rtGradle = Artifactory.newGradleBuild()
def buildInfo
stage ('Clone') {
git url: 'https://github.com/cloudacademy/devops-webapp.git'
}
stage ('Artifactory Configuration') {
rtGradle.tool = "gradle-5.6.4" // Tool name from Jenkins configuration
rtGradle.deployer repo: 'gradle-release-local', server: server
rtGradle.resolver repo: 'jcenter', server: server
}
stage ('Gradle Build') {
buildInfo = rtGradle.run rootDir: "./", buildFile: 'build.gradle', tasks: 'clean build'
}
stage ('Gradle Publish') {
buildInfo = rtGradle.run rootDir: "./", buildFile: 'build.gradle', tasks: 'artifactoryPublish'
}
stage ('Artifactory Publish Build Info') {
server.publishBuildInfo buildInfo
}
}
//END-OF-SCRIPT`
I am having an issue with Gradle build. It says that Couldn't find Gradle executable. I have posted a screenshot below

phihai222
Metadata
Metadata
Assignees
Labels
No labels