From e2439b437a413acbaece96d8acd339f96decf937 Mon Sep 17 00:00:00 2001 From: Marco Miller Date: Tue, 31 Mar 2020 16:37:52 -0400 Subject: [PATCH 1/3] ElasticContainer: Upgrade V6_8 to elasticsearch 6.8.8 Change-Id: Ib108ecc6318bd62e2fe23062943c82016d7133b5 --- javatests/com/google/gerrit/elasticsearch/ElasticContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java b/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java index dd3e36478d..848aa08143 100644 --- a/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java +++ b/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java @@ -53,7 +53,7 @@ public class ElasticContainer extends ElasticsearchContainer { case V6_7: return "blacktop/elasticsearch:6.7.2"; case V6_8: - return "blacktop/elasticsearch:6.8.7"; + return "blacktop/elasticsearch:6.8.8"; case V7_0: return "blacktop/elasticsearch:7.0.1"; case V7_1: From b120a1db9c61892b030f89b1e7dc2164db284ca5 Mon Sep 17 00:00:00 2001 From: Marco Miller Date: Tue, 31 Mar 2020 16:43:50 -0400 Subject: [PATCH 2/3] ElasticContainer: Upgrade V7_6 to elasticsearch 7.6.2 Upgrade elasticsearch-rest-client to 7.6.2, accordingly. Change-Id: If7d3795a4b4cb352d3c57dc83077f58c7032defc --- .../com/google/gerrit/elasticsearch/ElasticContainer.java | 2 +- tools/nongoogle.bzl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java b/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java index 848aa08143..9d0319cd6e 100644 --- a/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java +++ b/javatests/com/google/gerrit/elasticsearch/ElasticContainer.java @@ -67,7 +67,7 @@ public class ElasticContainer extends ElasticsearchContainer { case V7_5: return "blacktop/elasticsearch:7.5.2"; case V7_6: - return "blacktop/elasticsearch:7.6.1"; + return "blacktop/elasticsearch:7.6.2"; } throw new IllegalStateException("No tests for version: " + version.name()); } diff --git a/tools/nongoogle.bzl b/tools/nongoogle.bzl index effc5fc35f..074071bff8 100644 --- a/tools/nongoogle.bzl +++ b/tools/nongoogle.bzl @@ -94,8 +94,8 @@ def declare_nongoogle_deps(): # and httpasyncclient as necessary. maven_jar( name = "elasticsearch-rest-client", - artifact = "org.elasticsearch.client:elasticsearch-rest-client:7.6.1", - sha1 = "6fb9f72e9d86a8c503f26f28fa7271f4ac065709", + artifact = "org.elasticsearch.client:elasticsearch-rest-client:7.6.2", + sha1 = "3da6691dcd1864243f11f07d51907320452c6400", ) maven_jar( From c1b543ee2f0509f7d87a85347966223d35b91754 Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Tue, 31 Mar 2020 16:53:41 +0100 Subject: [PATCH 3/3] Report to Checks when the build starts Give the feedback to the Checks plugin about the exact moment of the start of the Gerrit builds. Provides three benefits: - Gives immediate feedback to the Checks GUI that the build is running - Provides the link to the build running log - Measures the start and total time of the build Change-Id: Ic20bf96e607ab65985c5474f3a34213e17534115 --- Jenkinsfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 631efcdd54..b4a3c6115b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,10 @@ class GerritCheck { } def getCheckResultFromBuild() { - def resultString = build.result.toString() + if (!build.getResult()) { + return "RUNNING" + } + def resultString = build.getResult().toString() if (resultString == 'SUCCESS') { return "SUCCESSFUL" } else if (resultString == 'NOT_BUILT' || resultString == 'ABORTED') { @@ -108,6 +111,9 @@ def prepareBuildsForMode(buildName, mode="reviewdb", retryTimes = 1) { def slaveBuild = null for (int i = 1; i <= retryTimes; i++) { try { + postCheck(new GerritCheck( + (buildName == "Gerrit-codestyle") ? "codestyle" : mode, + new Build(currentBuild.getAbsoluteUrl(), null))) slaveBuild = build job: "${buildName}", parameters: [ string(name: 'REFSPEC', value: "refs/changes/${env.BRANCH_NAME}"), string(name: 'BRANCH', value: env.GERRIT_PATCHSET_REVISION), @@ -119,9 +125,11 @@ def prepareBuildsForMode(buildName, mode="reviewdb", retryTimes = 1) { if (buildName == "Gerrit-codestyle"){ Builds.codeStyle = new Build( slaveBuild.getAbsoluteUrl(), slaveBuild.getResult()) + postCheck(new GerritCheck("codestyle", Builds.codeStyle)) } else { Builds.verification[mode] = new Build( slaveBuild.getAbsoluteUrl(), slaveBuild.getResult()) + postCheck(new GerritCheck(mode, Builds.verification[mode])) } if (slaveBuild.getResult() == "SUCCESS") { break @@ -235,7 +243,6 @@ node ('master') { stage('Report to Gerrit'){ resCodeStyle = getLabelValue(1, Builds.codeStyle.result) gerritReview labels: ['Code-Style': resCodeStyle] - postCheck(new GerritCheck("codestyle", Builds.codeStyle)) def verificationResults = Builds.verification.collect { k, v -> v } def resVerify = verificationResults.inject(1) { @@ -243,10 +250,6 @@ node ('master') { } gerritReview labels: ['Verified': resVerify] - Builds.verification.each { type, build -> postCheck( - new GerritCheck(type, build) - )} - setResult(resVerify, resCodeStyle) } }