How to test BitBucket pull requests? - jenkins

Is there any tool or plugin for Jenkins that would monitor pull requests in Jenkins and do a build (in my case jslint javascript files) and report to the pull request if there are any errors?

All I can find is https://bitbucket.org/osrf/bitbucket-jenkins
It's active but far from feature complete.

There is a nice plugin for this available at:
https://github.com/jenkinsci/bitbucket-pullrequest-builder-plugin

Related

How to create a Pull request CI/CD trigger on certain file changes only?

In CI/CD, I would like to know if it's possible to create a Pull request CI/CD trigger, that runs on changes to specific files/folders only?
I know that google cloud build does not support this(some other popular tools do not support too). If that's the case, then what can be my alternates?
This is not the complete answer but few cents from me, can you put a check into some shell script to look for a path/file from workspace in Jenkins or whatever build tool u are using, if that path/file is part of git commit then proceed with build.

What are the differences between the Github Branch Source plugin and the Github Pull Request Builder

I am trying to find a solution that will build a CI pipeline when a Pull Request on a project is initiated. Both of these plugins seem like viable options but I can't seem to find any information on the differences between the two.
https://plugins.jenkins.io/ghprb/#documentation mentions that GitHub Branch Source Plugin is the recommended option.

how to publish klocwork results on sonarqube

We are running both: Klocwork for C++ and SonarQube for Java and C# projects as a CI process using Jenkins. Since the SonarQube dashboard is much better, I would like to publish Klocwork results on the SonarQube.
Is it possible using some kind of Jenkins plugin? Any other option?
There is a SonarQube plugin for Klocwork available on this updated page: www.emenda.com/klocwork-sonarqube-plugin
You will need to complete the request form on the web page in order to obtain the resource.
To publish Klockwork results in SonarQube you need not a Jenkins plugin but a SonarQube plugin. There appears to be one but I have no experience with it, and the screenshots on the site are quite old.
If you don't have any luck with it, another option would be to develop your own plugin. If you decide to go that route, you can post specific plugin development questions to the SonarQube Google Group.

How to trigger a Jenkins build on a new artifact in Artifactory?

Can Artifactory be used as "SCM" or source in Jenkins to trigger the builds on an particular artifact deploy?
Don't see (or miss it) anything similar in the Artifactory Jenkis plugin description (and on Jenkins side)
This could be needed for instance if there is only access to the Artifactory repository and not to the SCM with code the binaries are coming from.
Such functionality looks to be availble for Nexus (via nexus-webhook-plugin). Hard to believe that this feature is missing for Artifactory.
It's maybe not as elegant as a hook, but I believe the URLTrigger Plugin will achieve what you're looking for. Listed in their use cases:
This plugin enables users to check if new artifacts (such as binaries) have been deployed in a repository (managed for example by a repository manager such as Sonatype Nexus, JFrog Artifactory, Apache Archiva and so on).
It allows you to check the last modification date and inspect the contents of the response for changes.
You would have to use a polling interval instead of relying on Artifactory to notify Jenkins via a hook, but in my experience polling is relatively innocuous even with lots of polls at high intervals.
Now you can use Enable Artifactory trigger in a newer version.
Go to Build Triggers and check the Enable Artifactory trigger checkbox.
More Detail on GitHub Support for Artifactory trigger

Can Jenkins detect when a new build is available on a Bamboo server?

Can Jenkins detect when a new build is available on a Bamboo server?
What I want is to create a Jenkins job that checks a Bamboo server for a new build. I want this job to run once per hour.
Then, other tests that I have on that Jenkins server will rely on that check passing in order for them to kick off.
If this is possible, what is the usual way of doing this? The Bamboo server is internal and does not need authentication to see status of builds or get build resources.
If there is no plugin for this, I do see a RSS feed at this URI: /rss/createAllBuildsRssFeed.action?feedType=rssAll&buildKey=RELEASE . What method would other Jenkins administrators use to read this feed?
I figured out the answer myself. I wrote a Gradle unit test to run in Jenkins that can read the RSS feed in Bamboo.
The real way to do it though, which didn't answer my question, is to add a post-build hook to either Subverison or Bamboo to send a HTTP get request to Jenkins, which notifies a job to run.

Resources