-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:elastic/kibana into fc/cheat-shee…
…t-doc
- Loading branch information
Showing
18,274 changed files
with
1,352,863 additions
and
532,898 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"upstream": "elastic/kibana", | ||
"branches": [{ "name": "7.x", "checked": true }, "7.2", "7.1", "7.0", "6.8", "6.7", "6.6", "6.5", "6.4", "6.3", "6.2", "6.1", "6.0", "5.6"], | ||
"branches": [{ "name": "7.x", "checked": true }, "7.5", "7.4", "7.3", "7.2", "7.1", "7.0", "6.8", "6.7", "6.6", "6.5", "6.4", "6.3", "6.2", "6.1", "6.0", "5.6"], | ||
"labels": ["backport"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
last 2 versions | ||
> 5% | ||
Safari 7 | ||
Safari 7 # for PhantomJS support: https://github.com/elastic/kibana/issues/27136 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
#!/bin/groovy | ||
|
||
library 'kibana-pipeline-library' | ||
kibanaLibrary.load() | ||
|
||
// Looks like 'oss:ciGroup:1' or 'oss:firefoxSmoke' | ||
def JOB_PARTS = params.CI_GROUP.split(':') | ||
def IS_XPACK = JOB_PARTS[0] == 'xpack' | ||
def JOB = JOB_PARTS[1] | ||
def CI_GROUP = JOB_PARTS.size() > 2 ? JOB_PARTS[2] : '' | ||
def EXECUTIONS = params.NUMBER_EXECUTIONS.toInteger() | ||
def AGENT_COUNT = getAgentCount(EXECUTIONS) | ||
|
||
def worker = getWorkerFromParams(IS_XPACK, JOB, CI_GROUP) | ||
|
||
def workerFailures = [] | ||
|
||
currentBuild.displayName += trunc(" ${params.GITHUB_OWNER}:${params.branch_specifier}", 24) | ||
currentBuild.description = "${params.CI_GROUP}<br />Agents: ${AGENT_COUNT}<br />Executions: ${params.NUMBER_EXECUTIONS}" | ||
|
||
stage("Kibana Pipeline") { | ||
timeout(time: 180, unit: 'MINUTES') { | ||
timestamps { | ||
ansiColor('xterm') { | ||
def agents = [:] | ||
for(def agentNumber = 1; agentNumber <= AGENT_COUNT; agentNumber++) { | ||
def agentNumberInside = agentNumber | ||
def agentExecutions = floor(EXECUTIONS/AGENT_COUNT) + (agentNumber <= EXECUTIONS%AGENT_COUNT ? 1 : 0) | ||
agents["agent-${agentNumber}"] = { | ||
catchError { | ||
print "Agent ${agentNumberInside} - ${agentExecutions} executions" | ||
|
||
kibanaPipeline.withWorkers('flaky-test-runner', { | ||
if (!IS_XPACK) { | ||
kibanaPipeline.buildOss() | ||
if (CI_GROUP == '1') { | ||
runbld("./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1") | ||
} | ||
} else { | ||
kibanaPipeline.buildXpack() | ||
} | ||
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))() | ||
} | ||
} | ||
} | ||
|
||
parallel(agents) | ||
|
||
currentBuild.description += ", Failures: ${workerFailures.size()}" | ||
|
||
if (workerFailures.size() > 0) { | ||
print "There were ${workerFailures.size()} test suite failures." | ||
print "The executions that failed were:" | ||
print workerFailures.join("\n") | ||
print "Please check 'Test Result' and 'Pipeline Steps' pages for more info" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
def getWorkerFromParams(isXpack, job, ciGroup) { | ||
if (!isXpack) { | ||
if (job == 'firefoxSmoke') { | ||
return kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke') }) | ||
} else if(job == 'visualRegression') { | ||
return kibanaPipeline.getPostBuildWorker('visualRegression', { runbld('./test/scripts/jenkins_visual_regression.sh', 'Execute kibana-visualRegression') }) | ||
} else { | ||
return kibanaPipeline.getOssCiGroupWorker(ciGroup) | ||
} | ||
} | ||
|
||
if (job == 'firefoxSmoke') { | ||
return kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke') }) | ||
} else if(job == 'visualRegression') { | ||
return kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld('./test/scripts/jenkins_xpack_visual_regression.sh', 'Execute xpack-visualRegression') }) | ||
} else { | ||
return kibanaPipeline.getXpackCiGroupWorker(ciGroup) | ||
} | ||
} | ||
|
||
def getWorkerMap(agentNumber, numberOfExecutions, worker, workerFailures, maxWorkerProcesses = 12) { | ||
def workerMap = [:] | ||
def numberOfWorkers = Math.min(numberOfExecutions, maxWorkerProcesses) | ||
|
||
for(def i = 1; i <= numberOfWorkers; i++) { | ||
def workerExecutions = numberOfExecutions/numberOfWorkers + (i <= numberOfExecutions%numberOfWorkers ? 1 : 0) | ||
|
||
workerMap["agent-${agentNumber}-worker-${i}"] = { workerNumber -> | ||
for(def j = 0; j < workerExecutions; j++) { | ||
print "Execute agent-${agentNumber} worker-${workerNumber}: ${j}" | ||
withEnv([ | ||
"JOB=agent-${agentNumber}-worker-${workerNumber}-${j}", | ||
"REMOVE_KIBANA_INSTALL_DIR=1", | ||
]) { | ||
catchError { | ||
try { | ||
worker(workerNumber) | ||
} catch (ex) { | ||
workerFailures << "agent-${agentNumber} worker-${workerNumber}-${j}" | ||
throw ex | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
return workerMap | ||
} | ||
|
||
def getAgentCount(executions) { | ||
// Increase agent count every 24 worker processess, up to 3 agents maximum | ||
return Math.min(3, 1 + floor(executions/24)) | ||
} | ||
|
||
def trunc(str, length) { | ||
if (str.size() >= length) { | ||
return str.take(length) + "..." | ||
} | ||
|
||
return str; | ||
} | ||
|
||
// All of the real rounding/truncating methods are sandboxed | ||
def floor(num) { | ||
return num | ||
.toString() | ||
.split('\\.')[0] | ||
.toInteger() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.