Skip to content

Commit

Permalink
Add crawler for MSBuild SonarQube Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
henryju committed Oct 22, 2015
1 parent d735736 commit 5d3fcb3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions msbuildsonarquberunner.groovy
@@ -0,0 +1,19 @@
#!./lib/runner.groovy
// Generates server-side metadata for MSBuild SonarQube Runner
import net.sf.json.*

def url = "https://api.github.com/repos/SonarSource/sonar-msbuild-runner/releases".toURL()
def releases = JSONArray.fromObject(url.text)

def json = []

for (JSONObject release : releases) {
if (!release.get("draft") && !release.get("prerelease")) {
json << ["id": release.get("tag_name"),
"name": "MSBuild SonarQube Runner ${release.get("tag_name")}".toString(),
"url": "https://github.com/SonarSource/sonar-msbuild-runner/releases/download/${release.get("tag_name")}/MSBuild.SonarQube.Runner-${release.get("tag_name")}.zip".toString()];
}
}

lib.DataWriter.write("hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller",JSONObject.fromObject([list:json]));

0 comments on commit 5d3fcb3

Please sign in to comment.