Skip to content

Commit 50f3ccc

Browse files
Merge branch '7.x' into backport/7.x/pr-55733
2 parents 6e1fe33 + b546bf8 commit 50f3ccc

2,112 files changed

Lines changed: 36607 additions & 29710 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/Jenkinsfile_coverage

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#!/bin/groovy
2+
3+
library 'kibana-pipeline-library'
4+
kibanaLibrary.load() // load from the Jenkins instance
5+
6+
stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a little bit
7+
timeout(time: 180, unit: 'MINUTES') {
8+
timestamps {
9+
ansiColor('xterm') {
10+
catchError {
11+
withEnv([
12+
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
13+
]) {
14+
parallel([
15+
'kibana-intake-agent': {
16+
withEnv([
17+
'NODE_ENV=test' // Needed for jest tests only
18+
]) {
19+
kibanaPipeline.intakeWorker('kibana-intake', './test/scripts/jenkins_unit.sh')()
20+
}
21+
},
22+
'x-pack-intake-agent': {
23+
withEnv([
24+
'NODE_ENV=test' // Needed for jest tests only
25+
]) {
26+
kibanaPipeline.intakeWorker('x-pack-intake', './test/scripts/jenkins_xpack.sh')()
27+
}
28+
},
29+
'kibana-oss-agent': kibanaPipeline.withWorkers('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
30+
'oss-ciGroup1': kibanaPipeline.getOssCiGroupWorker(1),
31+
'oss-ciGroup2': kibanaPipeline.getOssCiGroupWorker(2),
32+
'oss-ciGroup3': kibanaPipeline.getOssCiGroupWorker(3),
33+
'oss-ciGroup4': kibanaPipeline.getOssCiGroupWorker(4),
34+
'oss-ciGroup5': kibanaPipeline.getOssCiGroupWorker(5),
35+
'oss-ciGroup6': kibanaPipeline.getOssCiGroupWorker(6),
36+
'oss-ciGroup7': kibanaPipeline.getOssCiGroupWorker(7),
37+
'oss-ciGroup8': kibanaPipeline.getOssCiGroupWorker(8),
38+
'oss-ciGroup9': kibanaPipeline.getOssCiGroupWorker(9),
39+
'oss-ciGroup10': kibanaPipeline.getOssCiGroupWorker(10),
40+
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
41+
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
42+
]),
43+
'kibana-xpack-agent-1': kibanaPipeline.withWorkers('kibana-xpack-tests-1', { kibanaPipeline.buildXpack() }, [
44+
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
45+
'xpack-ciGroup2': kibanaPipeline.getXpackCiGroupWorker(2),
46+
]),
47+
'kibana-xpack-agent-2': kibanaPipeline.withWorkers('kibana-xpack-tests-2', { kibanaPipeline.buildXpack() }, [
48+
'xpack-ciGroup3': kibanaPipeline.getXpackCiGroupWorker(3),
49+
'xpack-ciGroup4': kibanaPipeline.getXpackCiGroupWorker(4),
50+
]),
51+
52+
'kibana-xpack-agent-3': kibanaPipeline.withWorkers('kibana-xpack-tests-3', { kibanaPipeline.buildXpack() }, [
53+
'xpack-ciGroup5': kibanaPipeline.getXpackCiGroupWorker(5),
54+
'xpack-ciGroup6': kibanaPipeline.getXpackCiGroupWorker(6),
55+
'xpack-ciGroup7': kibanaPipeline.getXpackCiGroupWorker(7),
56+
'xpack-ciGroup8': kibanaPipeline.getXpackCiGroupWorker(8),
57+
'xpack-ciGroup9': kibanaPipeline.getXpackCiGroupWorker(9),
58+
'xpack-ciGroup10': kibanaPipeline.getXpackCiGroupWorker(10),
59+
]),
60+
])
61+
kibanaPipeline.jobRunner('tests-l', false) {
62+
kibanaPipeline.downloadCoverageArtifacts()
63+
kibanaPipeline.bash(
64+
'''
65+
# bootstrap from x-pack folder
66+
source src/dev/ci_setup/setup_env.sh
67+
cd x-pack
68+
yarn kbn bootstrap --prefer-offline
69+
cd ..
70+
# extract archives
71+
mkdir -p /tmp/extracted_coverage
72+
echo extracting intakes
73+
tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
74+
tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
75+
echo extracting kibana-oss-tests
76+
tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
77+
echo extracting kibana-xpack-tests
78+
for i in {1..3}; do
79+
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests-${i}/kibana-coverage.tar.gz -C /tmp/extracted_coverage
80+
done
81+
# replace path in json files to have valid html report
82+
pwd=$(pwd)
83+
du -sh /tmp/extracted_coverage/target/kibana-coverage/
84+
echo replacing path in json files
85+
for i in {1..9}; do
86+
sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
87+
done
88+
wait
89+
# merge oss & x-pack reports
90+
echo merging coverage reports
91+
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
92+
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
93+
echo copy mocha reports
94+
mkdir -p target/kibana-coverage/mocha-combined
95+
cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
96+
''',
97+
"run `yarn kbn bootstrap && merge coverage`"
98+
)
99+
sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
100+
kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
101+
sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
102+
kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
103+
sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
104+
kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
105+
}
106+
}
107+
}
108+
kibanaPipeline.sendMail()
109+
}
110+
}
111+
}
112+
}

.ci/es-snapshots/Jenkinsfile_verify_es

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ timeout(time: 120, unit: 'MINUTES') {
2626
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
2727
parallel([
2828
// TODO we just need to run integration tests from intake?
29-
'kibana-intake-agent': kibanaPipeline.legacyJobRunner('kibana-intake'),
30-
'x-pack-intake-agent': kibanaPipeline.legacyJobRunner('x-pack-intake'),
29+
'kibana-intake-agent': kibanaPipeline.intakeWorker('kibana-intake', './test/scripts/jenkins_unit.sh'),
30+
'x-pack-intake-agent': kibanaPipeline.intakeWorker('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
3131
'kibana-oss-agent': kibanaPipeline.withWorkers('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
3232
'oss-ciGroup1': kibanaPipeline.getOssCiGroupWorker(1),
3333
'oss-ciGroup2': kibanaPipeline.getOssCiGroupWorker(2),

.ci/jobs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is needed by functionalTests:ensureAllTestsInCiGroup for the list of ciGroups. That must be changed before this file can be removed
2+
13
JOB:
24
- kibana-intake
35
- x-pack-intake

.ci/run.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

.eslintrc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ module.exports = {
250250
{
251251
target: [
252252
'(src|x-pack)/plugins/**/*',
253-
'!(src|x-pack)/plugins/*/server/**/*',
253+
'!(src|x-pack)/plugins/**/server/**/*',
254254

255255
'src/legacy/core_plugins/**/*',
256-
'!src/legacy/core_plugins/*/server/**/*',
257-
'!src/legacy/core_plugins/*/index.{js,ts,tsx}',
256+
'!src/legacy/core_plugins/**/server/**/*',
257+
'!src/legacy/core_plugins/**/index.{js,ts,tsx}',
258258

259259
'x-pack/legacy/plugins/**/*',
260-
'!x-pack/legacy/plugins/*/server/**/*',
261-
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
260+
'!x-pack/legacy/plugins/**/server/**/*',
261+
'!x-pack/legacy/plugins/**/index.{js,ts,tsx}',
262262

263263
'examples/**/*',
264264
'!examples/**/server/**/*',

.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"embeddableExamples": "examples/embeddable_examples",
1313
"share": "src/plugins/share",
1414
"home": "src/plugins/home",
15+
"charts": "src/plugins/charts",
1516
"esUi": "src/plugins/es_ui_shared",
1617
"devTools": "src/plugins/dev_tools",
1718
"expressions": "src/plugins/expressions",

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ The `config/kibana.yml` file stores user configuration directives. Since this fi
338338

339339
#### Setting Up SSL
340340

341-
Kibana includes a self-signed certificate that can be used for development purposes: `yarn start --ssl`.
341+
Kibana includes self-signed certificates that can be used for development purposes in the browser and for communicating with Elasticsearch: `yarn start --ssl` & `yarn es snapshot --ssl`.
342342

343343
### Linting
344344

Jenkinsfile

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@ library 'kibana-pipeline-library'
44
kibanaLibrary.load()
55

66
stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a little bit
7-
timeout(time: 120, unit: 'MINUTES') {
7+
timeout(time: 135, unit: 'MINUTES') {
88
timestamps {
99
ansiColor('xterm') {
1010
githubPr.withDefaultPrComments {
1111
catchError {
12+
retryable.enable()
1213
parallel([
13-
'kibana-intake-agent': kibanaPipeline.legacyJobRunner('kibana-intake'),
14-
'x-pack-intake-agent': kibanaPipeline.legacyJobRunner('x-pack-intake'),
14+
'kibana-intake-agent': kibanaPipeline.intakeWorker('kibana-intake', './test/scripts/jenkins_unit.sh'),
15+
'x-pack-intake-agent': kibanaPipeline.intakeWorker('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
1516
'kibana-oss-agent': kibanaPipeline.withWorkers('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
16-
'oss-firefoxSmoke': kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke') }),
17+
'oss-firefoxSmoke': kibanaPipeline.getPostBuildWorker('firefoxSmoke', {
18+
retryable('kibana-firefoxSmoke') {
19+
runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke')
20+
}
21+
}),
1722
'oss-ciGroup1': kibanaPipeline.getOssCiGroupWorker(1),
1823
'oss-ciGroup2': kibanaPipeline.getOssCiGroupWorker(2),
1924
'oss-ciGroup3': kibanaPipeline.getOssCiGroupWorker(3),
@@ -26,11 +31,19 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
2631
'oss-ciGroup10': kibanaPipeline.getOssCiGroupWorker(10),
2732
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
2833
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
29-
'oss-accessibility': kibanaPipeline.getPostBuildWorker('accessibility', { runbld('./test/scripts/jenkins_accessibility.sh', 'Execute accessibility tests') }),
34+
'oss-accessibility': kibanaPipeline.getPostBuildWorker('accessibility', {
35+
retryable('kibana-accessibility') {
36+
runbld('./test/scripts/jenkins_accessibility.sh', 'Execute accessibility tests')
37+
}
38+
}),
3039
// 'oss-visualRegression': kibanaPipeline.getPostBuildWorker('visualRegression', { runbld('./test/scripts/jenkins_visual_regression.sh', 'Execute kibana-visualRegression') }),
3140
]),
3241
'kibana-xpack-agent': kibanaPipeline.withWorkers('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
33-
'xpack-firefoxSmoke': kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke') }),
42+
'xpack-firefoxSmoke': kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', {
43+
retryable('xpack-firefoxSmoke') {
44+
runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke')
45+
}
46+
}),
3447
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
3548
'xpack-ciGroup2': kibanaPipeline.getXpackCiGroupWorker(2),
3649
'xpack-ciGroup3': kibanaPipeline.getXpackCiGroupWorker(3),
@@ -41,12 +54,18 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
4154
'xpack-ciGroup8': kibanaPipeline.getXpackCiGroupWorker(8),
4255
'xpack-ciGroup9': kibanaPipeline.getXpackCiGroupWorker(9),
4356
'xpack-ciGroup10': kibanaPipeline.getXpackCiGroupWorker(10),
44-
'xpack-accessibility': kibanaPipeline.getPostBuildWorker('xpack-accessibility', { runbld('./test/scripts/jenkins_xpack_accessibility.sh', 'Execute xpack-accessibility tests') }),
57+
'xpack-accessibility': kibanaPipeline.getPostBuildWorker('xpack-accessibility', {
58+
retryable('xpack-accessibility') {
59+
runbld('./test/scripts/jenkins_xpack_accessibility.sh', 'Execute xpack-accessibility tests')
60+
}
61+
}),
4562
// 'xpack-visualRegression': kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld('./test/scripts/jenkins_xpack_visual_regression.sh', 'Execute xpack-visualRegression') }),
4663
]),
4764
])
4865
}
4966
}
67+
68+
retryable.printFlakyFailures()
5069
kibanaPipeline.sendMail()
5170
}
5271
}

NOTICE.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,40 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
153153
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
154154
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
155155

156+
---
157+
This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack
158+
which is available under a "MIT" license. The files based on this license are:
159+
160+
- windows_defense_evasion_via_filter_manager.json
161+
- windows_process_discovery_via_tasklist_command.json
162+
- windows_priv_escalation_via_accessibility_features.json
163+
- windows_persistence_via_application_shimming.json
164+
- windows_execution_via_trusted_developer_utilities.json
165+
- windows_execution_via_net_com_assemblies.json
166+
- windows_execution_via_connection_manager.json
167+
168+
MIT License
169+
170+
Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong
171+
172+
Permission is hereby granted, free of charge, to any person obtaining a copy of
173+
this software and associated documentation files (the "Software"), to deal in
174+
the Software without restriction, including without limitation the rights to
175+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
176+
of the Software, and to permit persons to whom the Software is furnished to do
177+
so, subject to the following conditions:
178+
179+
The above copyright notice and this permission notice shall be included in all
180+
copies or substantial portions of the Software.
181+
182+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
183+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
185+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
186+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
187+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
188+
SOFTWARE.
189+
156190
---
157191
This product includes code that is adapted from mapbox-gl-js, which is
158192
available under a "BSD-3-Clause" license.

api-documenter.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"newlineKind": "lf",
3+
"outputTarget": "markdown"
4+
}

0 commit comments

Comments
 (0)