summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Draebing <thomas.draebing@sap.com>2019-10-17 10:13:16 +0200
committerThomas Draebing <thomas.draebing@sap.com>2019-10-17 11:29:16 +0200
commit70501f4531f67a465f7a56065690fb6defbb40bd (patch)
treec74cdf37e5b952edf38acf839db58440a5ef39e2
parentf27c6bef5c1fa911f412eae32401bfd76fdb09c3 (diff)
Fix RejectedAccessException during posting checks in Jenkinsfile
-rw-r--r--Jenkinsfile11
1 files changed, 4 insertions, 7 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 94fae55274..d6ff0df099 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -65,12 +65,6 @@ class GerritCheck {
this.build = build
}
- def printCheckSummary() {
- println "----------------------------------------------------------------------------"
- println "Gerrit Check: ${uuid}=" + build.result + " to change " + changeNum + "/" + sha1
- println "----------------------------------------------------------------------------"
- }
-
def getCheckResultFromBuild() {
switch(build.result) {
case 'SUCCESS':
@@ -103,7 +97,10 @@ def postCheck(check) {
httpRequest(httpMode: 'POST', authentication: Globals.gerritCredentialsId,
contentType: 'APPLICATION_JSON', requestBody: json,
validResponseCodes: '200', url: gerritPostUrl)
- check.printCheckSummary()
+ echo "----------------------------------------------------------------------------"
+ echo "Gerrit Check: ${check.uuid}=" + check.build.result + " to change "
+ + check.changeNum + "/" + check.sha1
+ echo "----------------------------------------------------------------------------"
} catch(Exception e) {
echo "ERROR> Failed to post check results to Gerrit: ${e}"
}