Merge branch 'stable-2.16' into stable-3.0
* stable-2.16: Report to Checks when the build starts ElasticContainer: Upgrade V7_6 to elasticsearch 7.6.2 ElasticContainer: Upgrade V6_8 to elasticsearch 6.8.8 Change-Id: I042c4b97af9642240e7e188e70081bfe22cc6b0b
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -54,7 +54,10 @@ class GerritCheck {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getCheckResultFromBuild() {
|
def getCheckResultFromBuild() {
|
||||||
def resultString = build.result.toString()
|
if (!build.getResult()) {
|
||||||
|
return "RUNNING"
|
||||||
|
}
|
||||||
|
def resultString = build.getResult().toString()
|
||||||
if (resultString == 'SUCCESS') {
|
if (resultString == 'SUCCESS') {
|
||||||
return "SUCCESSFUL"
|
return "SUCCESSFUL"
|
||||||
} else if (resultString == 'NOT_BUILT' || resultString == 'ABORTED') {
|
} else if (resultString == 'NOT_BUILT' || resultString == 'ABORTED') {
|
||||||
@@ -108,6 +111,9 @@ def prepareBuildsForMode(buildName, mode="notedb", retryTimes = 1) {
|
|||||||
def slaveBuild = null
|
def slaveBuild = null
|
||||||
for (int i = 1; i <= retryTimes; i++) {
|
for (int i = 1; i <= retryTimes; i++) {
|
||||||
try {
|
try {
|
||||||
|
postCheck(new GerritCheck(
|
||||||
|
(buildName == "Gerrit-codestyle") ? "codestyle" : mode,
|
||||||
|
new Build(currentBuild.getAbsoluteUrl(), null)))
|
||||||
slaveBuild = build job: "${buildName}", parameters: [
|
slaveBuild = build job: "${buildName}", parameters: [
|
||||||
string(name: 'REFSPEC', value: "refs/changes/${env.BRANCH_NAME}"),
|
string(name: 'REFSPEC', value: "refs/changes/${env.BRANCH_NAME}"),
|
||||||
string(name: 'BRANCH', value: env.GERRIT_PATCHSET_REVISION),
|
string(name: 'BRANCH', value: env.GERRIT_PATCHSET_REVISION),
|
||||||
@@ -119,9 +125,11 @@ def prepareBuildsForMode(buildName, mode="notedb", retryTimes = 1) {
|
|||||||
if (buildName == "Gerrit-codestyle"){
|
if (buildName == "Gerrit-codestyle"){
|
||||||
Builds.codeStyle = new Build(
|
Builds.codeStyle = new Build(
|
||||||
slaveBuild.getAbsoluteUrl(), slaveBuild.getResult())
|
slaveBuild.getAbsoluteUrl(), slaveBuild.getResult())
|
||||||
|
postCheck(new GerritCheck("codestyle", Builds.codeStyle))
|
||||||
} else {
|
} else {
|
||||||
Builds.verification[mode] = new Build(
|
Builds.verification[mode] = new Build(
|
||||||
slaveBuild.getAbsoluteUrl(), slaveBuild.getResult())
|
slaveBuild.getAbsoluteUrl(), slaveBuild.getResult())
|
||||||
|
postCheck(new GerritCheck(mode, Builds.verification[mode]))
|
||||||
}
|
}
|
||||||
if (slaveBuild.getResult() == "SUCCESS") {
|
if (slaveBuild.getResult() == "SUCCESS") {
|
||||||
break
|
break
|
||||||
@@ -235,7 +243,6 @@ node ('master') {
|
|||||||
stage('Report to Gerrit'){
|
stage('Report to Gerrit'){
|
||||||
resCodeStyle = getLabelValue(1, Builds.codeStyle.result)
|
resCodeStyle = getLabelValue(1, Builds.codeStyle.result)
|
||||||
gerritReview labels: ['Code-Style': resCodeStyle]
|
gerritReview labels: ['Code-Style': resCodeStyle]
|
||||||
postCheck(new GerritCheck("codestyle", Builds.codeStyle))
|
|
||||||
|
|
||||||
def verificationResults = Builds.verification.collect { k, v -> v }
|
def verificationResults = Builds.verification.collect { k, v -> v }
|
||||||
def resVerify = verificationResults.inject(1) {
|
def resVerify = verificationResults.inject(1) {
|
||||||
@@ -243,10 +250,6 @@ node ('master') {
|
|||||||
}
|
}
|
||||||
gerritReview labels: ['Verified': resVerify]
|
gerritReview labels: ['Verified': resVerify]
|
||||||
|
|
||||||
Builds.verification.each { type, build -> postCheck(
|
|
||||||
new GerritCheck(type, build)
|
|
||||||
)}
|
|
||||||
|
|
||||||
setResult(resVerify, resCodeStyle)
|
setResult(resVerify, resCodeStyle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class ElasticContainer extends ElasticsearchContainer {
|
|||||||
case V6_7:
|
case V6_7:
|
||||||
return "blacktop/elasticsearch:6.7.2";
|
return "blacktop/elasticsearch:6.7.2";
|
||||||
case V6_8:
|
case V6_8:
|
||||||
return "blacktop/elasticsearch:6.8.7";
|
return "blacktop/elasticsearch:6.8.8";
|
||||||
case V7_0:
|
case V7_0:
|
||||||
return "blacktop/elasticsearch:7.0.1";
|
return "blacktop/elasticsearch:7.0.1";
|
||||||
case V7_1:
|
case V7_1:
|
||||||
@@ -67,7 +67,7 @@ public class ElasticContainer extends ElasticsearchContainer {
|
|||||||
case V7_5:
|
case V7_5:
|
||||||
return "blacktop/elasticsearch:7.5.2";
|
return "blacktop/elasticsearch:7.5.2";
|
||||||
case V7_6:
|
case V7_6:
|
||||||
return "blacktop/elasticsearch:7.6.1";
|
return "blacktop/elasticsearch:7.6.2";
|
||||||
}
|
}
|
||||||
throw new IllegalStateException("No tests for version: " + version.name());
|
throw new IllegalStateException("No tests for version: " + version.name());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ def declare_nongoogle_deps():
|
|||||||
# and httpasyncclient as necessary.
|
# and httpasyncclient as necessary.
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "elasticsearch-rest-client",
|
name = "elasticsearch-rest-client",
|
||||||
artifact = "org.elasticsearch.client:elasticsearch-rest-client:7.6.1",
|
artifact = "org.elasticsearch.client:elasticsearch-rest-client:7.6.2",
|
||||||
sha1 = "6fb9f72e9d86a8c503f26f28fa7271f4ac065709",
|
sha1 = "3da6691dcd1864243f11f07d51907320452c6400",
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
|
|||||||
Reference in New Issue
Block a user