Community
Participate
Working Groups
The git plugin allows you to monitor any branch using branch specifier (leave blank for default): ** When a change occurs on a branch the log says Commencing build with revision abcd1234 (origin/master) Checking out abcd1234 (origin/master) however in the job configuration the environment variable $GIT_COMMIT has the value abcd1234 but $GIT_BRANCH is not set, and so there's no way of knowing that it's building the upstream master branch. It would be useful to set the origin/master as $GIT_BRANCH since this may be semantically interesting over and above the hash itself (i.e. am I building the 'qa' or 'production' branch). It would also be useful to expose the upstream branch name e.g. $GIT_UPSTREAM_BRANCH as the prefix 'origin/' is something set in the job description itself so the text 'origin/' cannot be assumed. In this case, the $GIT_UPSTREAM_BRANCH would have just 'master'.