commit | 4d03a407ab047e8172dca3ad4898f4808f0bb2a2 | [log] [tgz] |
---|---|---|
author | Mykyta Karpin <mkarpin@mirantis.com> | Wed Dec 28 15:21:24 2022 +0200 |
committer | Mykyta Karpin <mkarpin@mirantis.com> | Wed Dec 28 15:21:24 2022 +0200 |
tree | 3fb601ef2e8115ec2377c829ba65b24a28a87490 | |
parent | 43cb06eac7a6369360a61e8f35ceaa8e4e6f498c [diff] |
Improve gate mode detection Related-Prod: https://mirantis.jira.com/browse/PRODX-29379 Change-Id: I5fd9bf8b5b8108176cbf1b73b0623dee9e6f3413
diff --git a/src/com/mirantis/mk/Gerrit.groovy b/src/com/mirantis/mk/Gerrit.groovy index a48f554..7af195d 100644 --- a/src/com/mirantis/mk/Gerrit.groovy +++ b/src/com/mirantis/mk/Gerrit.groovy
@@ -551,7 +551,8 @@ } common.infoMsg("GERRIT_EVENT_COMMENT_TEXT is ${gerritEventCommentTextStr}") } - if (gerritEventType == 'comment-added' && gerritEventCommentTextStr =~ /^Patch Set \d+:\s.*Workflow\+1$/) { + def gateComment = gerritEventCommentTextStr.split('\n')[0] + if (gerritEventType == 'comment-added' && gateComment =~ /^Patch Set \d+:\s.*Workflow\+1$/) { common.infoMsg("Running in gate mode") res = true }