gradle - Why does Jenkins change my gradlew, and how to prevent that? -


i'm trying 'release' project using gradle release-plugin

the plugin starts checking if working copy clean, versioned stuff gets released.

this works fine on local machine. when try same thing in jenkins job, build fails complaining various stuff changed in workplace. decided lot of stuff internally used jenkins , added gitignore:

caches/ native/ wrapper/ 

but considers gradlew changed:

failure: build failed exception.  * went wrong: execution failed task ':checkcommitneeded'. > have uncommitted files:   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    m gradlew   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

why jenkins change file how prevent that?

i think following settings on jenkins job might relevant:

  • checkout/merge local branch (optional) set master. without setting release plugin complains not being on branch

  • clean after checkout checked, checking/unchecking didn't make difference

  • make gradlew executable checked, , @ least me sounds cause, unchecking makes build faile because gradlew not executable

pretty old question, record coming on here, jenkins isn't @ fault here, should commit gradlew executable bit set:

# git update-index --chmod=+x gradlew # git commit 

then no longer need jenkins setting set executable, workaround causing issue.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -