We are building Jenkins job to create .war files with help of gradle.

gradle clean build war -x test

As gradle is not installed on Jenkins node, job is failing. The git repo, have gradlew, gradlew.bat are present. With help of above files, how can we install gradle on Jenkins?

We can not use gradle plugin. Thank you.


Are you able to download from the internet?

If so, I would guess you have to treat Jenkins Master (and any workers you have) like a local machine and follow installation steps of gradle.


For example, whatever you use to configure servers will need to download gradle, install it, set the path - and then rather than using the gradle build options in Jenkins, you will run a shell command that performs the gradle command you want it to run.

This could be incorrect as I've never done it this way before, but it seems reasonable to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.