Trigger scan based on Github Pull Request without CI Server

(Patrick) #1


we’re trying out SonarCloud and want to have a scan triggered on every opened pull request in Github.
I’m struggling with setting it up without using a webhook from our CI (Jenkins), which is not publicly accessable, but only from a private VPN.
Is there any way to do trigger scans from Github directly to SonarCloud without setting up a CI to listen on a webhook call and trigger the scan?


(Alex Odoux) #2

Hi Patrick,

Welcome to SonarCloud! Depending on the programming languages you are using, you may want to try out our Automatic Analysis feature. See this topic.

Best regards,

(Patrick) #3

Hi Alex,
thanks for the fast response.
We’re using java and as far as I see this is not supported yet for the Auto Scan feature, correct?

(Alex Odoux) #4

That’s correct

(Simon Brandhof) #5

Hi Patrick,

Indeed the Autoscan feature does not match your need. Because your constraint of VPN does not only affect code analysis but also regular builds, did you already consider moving to a CI service like Cirrus or Travis?


(Patrick) #6

Hi Simon,

the CI has access to the internet, but is not accessible from the internet, so except for not being able to receive webhook calls, it shouldn’t affect regular builds.
The solution I’m going for is a script/job on our Jenkins which periodically checks the open PR requests in Github and if one was created/updated checks out the respective branch and runs a scan via maven.
I just wanted to double check if I’m not overlooking an existing solution/feature for this issue before setting it up the described way.
Thanks for the info!