Skip to content

Error: Couldnt find Gradle executable #1

Description

@t-rhex

`//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
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions