I'm having some difficulty with Jenkins Git Publisher committing and pushing code back to master after my build. My build process increases a version number in one of my files and then I want to commit this file back into the repo, but I can't seem to get it to work.
In Source Code Management->Git, these are my settings:
Then, in Git Publisher, these are my settings:
This is the output from Jenkins:
Pushing HEAD to branch master at repo Android
Adding note to namespace "master":
Updating version
Please help!
I think jenkins git publisher plugin is not doing anything like
git add .
git commit -m 'xxx'
Plugin only perform push and optionally add note using git-notes.
See notes here:
https://github.com/hamsterready/jenkins-git-publisher-test/tree/refs/notes/master
To achieve something like this: https://github.com/hamsterready/jenkins-git-publisher-test/commit/d80a1eef2133bee6d7a57b1b229ccd5990d2d606
I have added post-build step (execute shell script) with:
git add .
git commit -m 'Updating git.properties'
And then enabled git publisher post-build action which pushed local commit to origin.