Send a link to Downstream_projects on Gerrit
This way the user can directly get a link to the useful results
of a global presubmit.
Change-Id: I40dc5ae8d19e5326117ac91a6c85659f5e150a3c
diff --git a/jenkins/jobs/CR-global.xml.tpl b/jenkins/jobs/CR-global.xml.tpl
index d68eea9..6d05ea3 100644
--- a/jenkins/jobs/CR-global.xml.tpl
+++ b/jenkins/jobs/CR-global.xml.tpl
@@ -48,6 +48,8 @@
params.CHANGE_NUMBER,
params.BRANCH) {
{{ imports['//jenkins/jobs:global.groovy'] }}
+ delegate.gerrit.comment(params.CHANGE_NUMBER, params.BRANCH,
+ "Review result of the global test at ${currentBuild.getAbsoluteUrl()}/Downstream_projects/")
}</script>
<sandbox>true</sandbox>
</definition>
diff --git a/jenkins/lib/vars/gerritReview.groovy b/jenkins/lib/vars/gerritReview.groovy
index 9da4b84..ff2142a 100644
--- a/jenkins/lib/vars/gerritReview.groovy
+++ b/jenkins/lib/vars/gerritReview.groovy
@@ -28,9 +28,9 @@
echo "Reviewing change ${url} (${branch})"
gerrit.addReviewer(changeNum)
gerrit.comment(changeNum, branch,
- "Starting build at ${JenkinsUtils.getBlueOceanUrl(currentBuild)}")
+ "Starting build at ${JenkinsUtils.getBlueOceanUrl(currentBuild)}")
}
- def config = [gerritBuild: currentBuild]
+ def config = [gerritBuild: currentBuild, gerrit: gerrit]
def result = null
try {
body.delegate = config