I'm trying to 'release' my project using the gradle release-plugin
The plugin starts by checking if my working copy is clean, so that only properly versioned stuff gets released.
This works just fine on my local machine. But when I try the same thing in a Jenkins job, the build fails complaining various stuff is changed in the workplace. I decided that a lot of stuff was just internally used by jenkins and added it to gitignore
:
caches/
native/
wrapper/
But it also considers gradlew
as changed:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':checkCommitNeeded'.
> You have uncommitted files:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
M gradlew
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Why does Jenkins change that file how do I prevent that?
I think the following settings on the Jenkins job might be relevant:
Checkout/merge to local branch (optional)
is set to master. Without this setting the release plugin complains about not being on a branchClean after checkout
is currently checked, but checking/unchecking it didn't make a differenceMake gradlew executable
is checked, and at least to me sounds like a likely cause, but unchecking it makes the build faile because gradlew is not executable