Skip to content

Instantly share code, notes, and snippets.

@jimCresswell
Created February 21, 2014 10:12
Show Gist options
  • Select an option

  • Save jimCresswell/9131865 to your computer and use it in GitHub Desktop.

Select an option

Save jimCresswell/9131865 to your computer and use it in GitHub Desktop.
Jenkins config to report a pull request merge product job result back to the Stash UI
run this script to create a environment variable config file in the workspace containing the SHA of the feature branch merge parent.
# put the feature branch parent of the pull request merge sha into a file variable.
echo parentSha=`git rev-list HEAD^2 -n 1` > gitVariables
at the first build step read in the config file in an inject environment variables step
${WORKSPACE}/gitVariables
In the Stash notify step click Advanced... and set the commit SHA to
$parentSha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment