Brother Logic
Brother Logic

Reputation: 286

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

Upvotes: 3

Views: 1050

Answers (2)

Brother Logic
Brother Logic

Reputation: 286

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.

Upvotes: 3

VonC
VonC

Reputation: 1324606

If you get

Failed to rev-parse: origin/${sha1}
No candidate revisions

, it could be related to issue 5.

A couple of suggestions:

Upvotes: 0

Related Questions