Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Couldnt find Gradle executable #1

Open
t-rhex opened this issue Mar 30, 2021 · 1 comment
Open

Error: Couldnt find Gradle executable #1

t-rhex opened this issue Mar 30, 2021 · 1 comment

Comments

@t-rhex
Copy link

t-rhex commented Mar 30, 2021

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

@phihai222
Copy link

I got the same issue !!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants