Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Pull Request Plugin

I'm trying to setup the pull request plugin. I've configured it as suggested in the documentation but if I specify the branch to build as ${sha1} then that variable doesn't seem to be resolved. So in my logs:

Building in workspace /Users/sat/.jenkins/jobs/JenkinsTest/workspace
> /usr/local/bin/git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> /usr/local/bin/git config remote.origin.url [email protected]:stucker/tester.git
Fetching upstream changes from [email protected]:stucker/tester.git
> /usr/local/bin/git --version
> /usr/local/bin/git fetch --tags --progress [email protected]:stucker/tester.git   +refs/pull/*:refs/remotes/origin/pr/*
> /usr/local/bin/git rev-parse origin/${sha1}^{commit}
> /usr/local/bin/git rev-parse ${sha1}^{commit}

But I don't know why that wouldn't work. This is coming off of a push triggered by the standard web hook

like image 843
Brother Logic Avatar asked Apr 17 '26 16:04

Brother Logic


1 Answers

I found that you can't run the regular build hook and the pull request on the same job - I had to have separate jobs - one for doing a regular build, and one for doing a pull request build. With that everything works fine.

like image 179
Brother Logic Avatar answered Apr 19 '26 14:04

Brother Logic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!