This is current as of Jenkins LTS (1.580.3)
- create a .gitignore file in your $JENKINS_HOME with the following
- this may need tuning to your liking
- ie storing artifacts etc
- setup some ENV variables for the user that jenkins runs under.
- I add the following to /home/jenkins/.bashrc
- and restart jenkins
export GIT_AUTHOR_NAME="Sir jenkins"
export GIT_AUTHOR_EMAIL="[email protected]"
export GIT_COMMITTER_NAME="Sir Jenkins"
export GIT_COMMITTER_EMAIL="[email protected]"
- create a new Jenkins periodic job with this bash script.