This is an automated email from the ASF dual-hosted git repository. kgyrtkirk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new f59e36b HIVE-23563: Early abort the build in case new commits are added to the PR (#1089) f59e36b is described below commit f59e36be149c3fbd22d9319f5c70e492744f08af Author: Zoltan Haindrich <zhaindr...@cloudera.com> AuthorDate: Thu Jun 11 09:06:45 2020 +0200 HIVE-23563: Early abort the build in case new commits are added to the PR (#1089) --- Jenkinsfile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 669b57e..37ca448 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,23 @@ properties([ ]) ]) +this.prHead = null; +def checkPrHead() { + if(env.CHANGE_ID) { + println("checkPrHead - prHead:" + prHead) + println("checkPrHead - prHead2:" + pullRequest.head) + if (prHead == null) { + prHead = pullRequest.head; + } else { + if(prHead != pullRequest.head) { + currentBuild.result = 'ABORTED' + error('Found new changes on PR; aborting current build') + } + } + } +} +checkPrHead() + def setPrLabel(String prLabel) { if (env.CHANGE_ID) { def mapping=[ @@ -89,7 +106,7 @@ def hdbPodTemplate(closure) { containerTemplate(name: 'hdb', image: 'kgyrtkirk/hive-dev-box:executor', ttyEnabled: true, command: 'cat', alwaysPullImage: true, resourceRequestCpu: '1800m', - resourceLimitCpu: '3000m', + resourceLimitCpu: '8000m', resourceRequestMemory: '6400Mi', resourceLimitMemory: '12000Mi' ), @@ -120,6 +137,7 @@ def jobWrappers(closure) { lock(label:'hive-precommit', quantity:1, variable: 'LOCKED_RESOURCE') { timestamps { echo env.LOCKED_RESOURCE + checkPrHead() closure() } } @@ -153,6 +171,7 @@ jobWrappers { stage('Compile') { buildHive("install -Dtest=noMatches") } + checkPrHead() stage('Upload') { saveWS() sh '''#!/bin/bash -e