mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Run pipeline scripts with runbld (#45844)
Change how runbld is invoked, and skip junit processing by default
This commit is contained in:
parent
e87114dfbb
commit
4142659079
4 changed files with 37 additions and 3 deletions
6
.ci/runbld_no_junit.yml
Normal file
6
.ci/runbld_no_junit.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
# This file is not picked up by anything automatically
|
||||
# It is used by being passed as an argument to runbld, when automatic processing of junit reports is not desired
|
||||
profiles:
|
||||
- ".*": # Match any job
|
||||
tests:
|
||||
junit-filename-pattern: "8d8bd494-d909-4e67-a052-7e8b5aaeb5e4" # A bogus path that should never exist
|
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
|
@ -80,6 +80,10 @@ def withWorkers(name, preWorkerClosure = {}, workerClosures = [:]) {
|
|||
uploadAllGcsArtifacts(name)
|
||||
}
|
||||
|
||||
catchError {
|
||||
runbldJunit()
|
||||
}
|
||||
|
||||
catchError {
|
||||
publishJunit()
|
||||
}
|
||||
|
@ -142,7 +146,7 @@ def legacyJobRunner(name) {
|
|||
]) {
|
||||
jobRunner('linux && immutable') {
|
||||
try {
|
||||
runbld '.ci/run.sh'
|
||||
runbld('.ci/run.sh', true)
|
||||
} finally {
|
||||
catchError {
|
||||
uploadAllGcsArtifacts(name)
|
||||
|
@ -253,8 +257,14 @@ def sendKibanaMail() {
|
|||
}
|
||||
}
|
||||
|
||||
def runbld(script) {
|
||||
sh '#!/usr/local/bin/runbld\n' + script
|
||||
def runbld(script, enableJunitProcessing = false) {
|
||||
def extraConfig = enableJunitProcessing ? "" : "--config ${env.WORKSPACE}/kibana/.ci/runbld_no_junit.yml"
|
||||
|
||||
sh "/usr/local/bin/runbld -d '${pwd()}' ${extraConfig} ${script}"
|
||||
}
|
||||
|
||||
def runbldJunit() {
|
||||
sh "/usr/local/bin/runbld -d '${pwd()}' ${env.WORKSPACE}/kibana/test/scripts/jenkins_runbld_junit.sh"
|
||||
}
|
||||
|
||||
def bash(script) {
|
||||
|
|
|
@ -136,3 +136,19 @@ function checks-reporter-with-killswitch() {
|
|||
export -f checks-reporter-with-killswitch
|
||||
|
||||
source "$KIBANA_DIR/src/dev/ci_setup/load_env_keys.sh"
|
||||
|
||||
ES_DIR="$PARENT_DIR/elasticsearch"
|
||||
ES_JAVA_PROP_PATH=$ES_DIR/.ci/java-versions.properties
|
||||
|
||||
if [[ -d "$ES_DIR" && -f "$ES_JAVA_PROP_PATH" ]]; then
|
||||
ES_BUILD_JAVA="$(grep "^ES_BUILD_JAVA" "$ES_JAVA_PROP_PATH" | cut -d'=' -f2 | tr -d '[:space:]')"
|
||||
export ES_BUILD_JAVA
|
||||
|
||||
if [ -z "$ES_BUILD_JAVA" ]; then
|
||||
echo "Unable to set JAVA_HOME, ES_BUILD_JAVA not present in $ES_JAVA_PROP_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Setting JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA"
|
||||
export JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
|
||||
fi
|
||||
|
|
2
test/scripts/jenkins_runbld_junit.sh
Executable file
2
test/scripts/jenkins_runbld_junit.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
# This file just exists to give runbld something to invoke before processing junit reports
|
||||
echo 'Processing junit reports with runbld...'
|
Loading…
Add table
Add a link
Reference in a new issue