Hello,

I'm configuring Github + Jenkins + Sonar.  Almost everything is working, 
and I am incredibly pleased (great job!)  I'm now struggling with one 
missing piece which seems like it should be simple.

The last piece I need is the Github pull request *number* as an environment 
variable to pass to Sonar for "preview" mode analysis.

Here are the relevant components and versions:

Jenkins version 2.46.3
Jenkins "GitHub Branch Source Plugin" version 2.0.5
Maven version 3.3.9
Maven Sonar plugin version 3.3.0.603
Sonar version  6.3.1.21392
Sonar Github plugin version 1.4.1

Per https://stackoverflow.com/a/32095346 it looks like the old "GitHub Pull 
Request Builder" plugin added a ${ghprbPullId} environment variable.  That 
environment variable is not set by the "GitHub Branch Source Plugin" (as 
far as I can tell).

A dump of "env" does not show anything about pull requests, change ID's, 
etc.  The known pull request number is not anywhere in the logs.

Suggestions?

If this isn't available through Jenkins, I think we could do some curl + 
Github API magic to search for the Pull Request number, but that obviously 
seems suboptimal.

Thanks in advance!

Cody

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4669eb11-556f-45b3-8a0f-9ebbbceaea76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to