How to find all changed files since last commited build in GIT ? I want to build not only the changed files at head revision but also, all the changed files which got chang
According to https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Environmentvariables, Jenkins provides the environment variables:
I plan to leverage those to accomplish something similar.
So what you'll want is something like:
tar cvzf /tmp/build.tar.gz `git diff --stat $GIT_PREVIOUS_COMMIT $GIT_COMMIT | grep '\|' | awk '{print $1}'`