nemccarthy / stash-pullrequest-builder-plugin

A Jenkins plugin for Building Stash Pull Requests
https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin
Other
64 stars 130 forks source link

Wishlist: Add environment variables to Jobs #13

Closed rawler closed 9 years ago

rawler commented 9 years ago

The GitHub pull-request plugin adds some useful Environment variables to the job, which enables some interesting tests to be performed. In our example, we would like to run static analysis on just the touched file of the commit, ensuring gradual improvement of code-quality. (Large code-base)

For that, we need something akin to "ghprbTargetBranch", to figure out which files is changed by this PR.

Could this be implemented?

nemccarthy commented 9 years ago

This is already the case. They should all come through as env vars... e.g. echo $targetBranch - see the README for the list.

screen shot 2015-06-07 at 3 51 34 pm

There are also the standard GIT env vars... screen shot 2015-06-07 at 3 51 59 pm

nemccarthy commented 9 years ago

I believe this has been fixed in PR #21

Can you test v1.3.0