Skip to content

Commit 86f76a2

Browse files
Merge branch 'master' into fix/112788
2 parents 1b2d56c + 7162f16 commit 86f76a2

File tree

714 files changed

+20649
-9277
lines changed

Some content is hidden

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

714 files changed

+20649
-9277
lines changed

.buildkite/pipelines/es_snapshots/verify.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ steps:
1919
- command: .buildkite/scripts/steps/build_kibana.sh
2020
label: Build Kibana Distribution and Plugins
2121
agents:
22-
queue: c2-8
22+
queue: c2-16
2323
key: build
2424
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
2525

@@ -91,13 +91,5 @@ steps:
9191
- wait: ~
9292
continue_on_failure: true
9393

94-
- plugins:
95-
- junit-annotate#v1.9.0:
96-
artifacts: target/junit/**/*.xml
97-
job-uuid-file-pattern: '-bk__(.*).xml'
98-
99-
- wait: ~
100-
continue_on_failure: true
101-
10294
- command: .buildkite/scripts/lifecycle/post_build.sh
10395
label: Post-Build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const stepInput = (key, nameOfSuite) => {
2+
return {
3+
key: `ftsr-suite/${key}`,
4+
text: nameOfSuite,
5+
required: false,
6+
default: '0',
7+
};
8+
};
9+
10+
const OSS_CI_GROUPS = 12;
11+
const XPACK_CI_GROUPS = 13;
12+
13+
const inputs = [
14+
{
15+
key: 'ftsr-override-count',
16+
text: 'Override for all suites',
17+
default: 0,
18+
required: true,
19+
},
20+
{
21+
key: 'ftsr-concurrency',
22+
text: 'Max concurrency per step',
23+
default: 20,
24+
required: true,
25+
},
26+
];
27+
28+
for (let i = 1; i <= OSS_CI_GROUPS; i++) {
29+
inputs.push(stepInput(`oss/cigroup/${i}`, `OSS CI Group ${i}`));
30+
}
31+
32+
for (let i = 1; i <= XPACK_CI_GROUPS; i++) {
33+
inputs.push(stepInput(`xpack/cigroup/${i}`, `Default CI Group ${i}`));
34+
}
35+
36+
const pipeline = {
37+
steps: [
38+
{
39+
input: 'Number of Runs',
40+
fields: inputs,
41+
},
42+
{
43+
wait: '~',
44+
},
45+
{
46+
command: '.buildkite/pipelines/flaky_tests/runner.sh',
47+
label: 'Create pipeline',
48+
},
49+
],
50+
};
51+
52+
console.log(JSON.stringify(pipeline, null, 2));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
node .buildkite/pipelines/flaky_tests/pipeline.js | buildkite-agent pipeline upload
+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
const { execSync } = require('child_process');
2+
3+
const keys = execSync('buildkite-agent meta-data keys')
4+
.toString()
5+
.split('\n')
6+
.filter((k) => k.startsWith('ftsr-suite/'));
7+
8+
const overrideCount = parseInt(
9+
execSync(`buildkite-agent meta-data get 'ftsr-override-count'`).toString().trim()
10+
);
11+
12+
const concurrency =
13+
parseInt(execSync(`buildkite-agent meta-data get 'ftsr-concurrency'`).toString().trim()) || 20;
14+
15+
const testSuites = [];
16+
for (const key of keys) {
17+
if (!key) {
18+
continue;
19+
}
20+
21+
const value =
22+
overrideCount || execSync(`buildkite-agent meta-data get '${key}'`).toString().trim();
23+
24+
testSuites.push({
25+
key: key.replace('ftsr-suite/', ''),
26+
count: value === '' ? defaultCount : parseInt(value),
27+
});
28+
}
29+
30+
const steps = [];
31+
const pipeline = {
32+
env: {
33+
IGNORE_SHIP_CI_STATS_ERROR: 'true',
34+
},
35+
steps: steps,
36+
};
37+
38+
steps.push({
39+
command: '.buildkite/scripts/steps/build_kibana.sh',
40+
label: 'Build Kibana Distribution and Plugins',
41+
agents: { queue: 'c2-8' },
42+
key: 'build',
43+
if: "build.env('BUILD_ID_FOR_ARTIFACTS') == null || build.env('BUILD_ID_FOR_ARTIFACTS') == ''",
44+
});
45+
46+
for (const testSuite of testSuites) {
47+
const TEST_SUITE = testSuite.key;
48+
const RUN_COUNT = testSuite.count;
49+
const UUID = TEST_SUITE + process.env.UUID;
50+
51+
const JOB_PARTS = TEST_SUITE.split('/');
52+
const IS_XPACK = JOB_PARTS[0] === 'xpack';
53+
const CI_GROUP = JOB_PARTS.length > 2 ? JOB_PARTS[2] : '';
54+
55+
if (RUN_COUNT < 1) {
56+
continue;
57+
}
58+
59+
if (IS_XPACK) {
60+
steps.push({
61+
command: `CI_GROUP=${CI_GROUP} .buildkite/scripts/steps/functional/xpack_cigroup.sh`,
62+
label: `Default CI Group ${CI_GROUP}`,
63+
agents: { queue: 'ci-group-6' },
64+
depends_on: 'build',
65+
parallelism: RUN_COUNT,
66+
concurrency: concurrency,
67+
concurrency_group: UUID,
68+
});
69+
} else {
70+
steps.push({
71+
command: `CI_GROUP=${CI_GROUP} .buildkite/scripts/steps/functional/oss_cigroup.sh`,
72+
label: `OSS CI Group ${CI_GROUP}`,
73+
agents: { queue: 'ci-group-4d' },
74+
depends_on: 'build',
75+
parallelism: RUN_COUNT,
76+
concurrency: concurrency,
77+
concurrency_group: UUID,
78+
});
79+
}
80+
}
81+
82+
console.log(JSON.stringify(pipeline, null, 2));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
UUID="$(cat /proc/sys/kernel/random/uuid)"
6+
export UUID
7+
8+
node .buildkite/pipelines/flaky_tests/runner.js | buildkite-agent pipeline upload

.buildkite/pipelines/hourly.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
- command: .buildkite/scripts/steps/build_kibana.sh
1010
label: Build Kibana Distribution and Plugins
1111
agents:
12-
queue: c2-8
12+
queue: c2-16
1313
key: build
1414
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
1515

@@ -159,13 +159,5 @@ steps:
159159
- wait: ~
160160
continue_on_failure: true
161161

162-
- plugins:
163-
- junit-annotate#v1.9.0:
164-
artifacts: target/junit/**/*.xml
165-
job-uuid-file-pattern: '-bk__(.*).xml'
166-
167-
- wait: ~
168-
continue_on_failure: true
169-
170162
- command: .buildkite/scripts/lifecycle/post_build.sh
171163
label: Post-Build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/functional/apm_cypress.sh
3+
label: 'APM Cypress Tests'
4+
agents:
5+
queue: ci-group-6
6+
depends_on: build
7+
timeout_in_minutes: 120
8+
retry:
9+
automatic:
10+
- exit_status: '*'
11+
limit: 1
+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
steps:
2+
- command: .buildkite/scripts/lifecycle/pre_build.sh
3+
label: Pre-Build
4+
5+
- wait
6+
7+
- command: .buildkite/scripts/steps/build_kibana.sh
8+
label: Build Kibana Distribution and Plugins
9+
agents:
10+
queue: c2-16
11+
key: build
12+
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
13+
14+
- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh
15+
label: 'Default CI Group'
16+
parallelism: 13
17+
agents:
18+
queue: ci-group-6
19+
depends_on: build
20+
timeout_in_minutes: 120
21+
key: default-cigroup
22+
retry:
23+
automatic:
24+
- exit_status: '*'
25+
limit: 1
26+
27+
- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh
28+
label: 'Docker CI Group'
29+
agents:
30+
queue: ci-group-6
31+
depends_on: build
32+
timeout_in_minutes: 120
33+
key: default-cigroup-docker
34+
retry:
35+
automatic:
36+
- exit_status: '*'
37+
limit: 1
38+
39+
- command: .buildkite/scripts/steps/functional/oss_cigroup.sh
40+
label: 'OSS CI Group'
41+
parallelism: 11
42+
agents:
43+
queue: ci-group-4d
44+
depends_on: build
45+
timeout_in_minutes: 120
46+
key: oss-cigroup
47+
retry:
48+
automatic:
49+
- exit_status: '*'
50+
limit: 1
51+
52+
- command: .buildkite/scripts/steps/functional/oss_accessibility.sh
53+
label: 'OSS Accessibility Tests'
54+
agents:
55+
queue: ci-group-4d
56+
depends_on: build
57+
timeout_in_minutes: 120
58+
retry:
59+
automatic:
60+
- exit_status: '*'
61+
limit: 1
62+
63+
- command: .buildkite/scripts/steps/functional/xpack_accessibility.sh
64+
label: 'Default Accessibility Tests'
65+
agents:
66+
queue: ci-group-6
67+
depends_on: build
68+
timeout_in_minutes: 120
69+
retry:
70+
automatic:
71+
- exit_status: '*'
72+
limit: 1
73+
74+
- command: .buildkite/scripts/steps/functional/oss_firefox.sh
75+
label: 'OSS Firefox Tests'
76+
agents:
77+
queue: ci-group-4d
78+
depends_on: build
79+
timeout_in_minutes: 120
80+
retry:
81+
automatic:
82+
- exit_status: '*'
83+
limit: 1
84+
85+
- command: .buildkite/scripts/steps/functional/xpack_firefox.sh
86+
label: 'Default Firefox Tests'
87+
agents:
88+
queue: ci-group-6
89+
depends_on: build
90+
timeout_in_minutes: 120
91+
retry:
92+
automatic:
93+
- exit_status: '*'
94+
limit: 1
95+
96+
- command: .buildkite/scripts/steps/functional/oss_misc.sh
97+
label: 'OSS Misc Functional Tests'
98+
agents:
99+
queue: ci-group-4d
100+
depends_on: build
101+
timeout_in_minutes: 120
102+
retry:
103+
automatic:
104+
- exit_status: '*'
105+
limit: 1
106+
107+
- command: .buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh
108+
label: 'Saved Object Field Metrics'
109+
agents:
110+
queue: ci-group-6
111+
depends_on: build
112+
timeout_in_minutes: 120
113+
retry:
114+
automatic:
115+
- exit_status: '*'
116+
limit: 1
117+
118+
- command: .buildkite/scripts/steps/test/jest_integration.sh
119+
label: 'Jest Integration Tests'
120+
agents:
121+
queue: n2-4
122+
timeout_in_minutes: 120
123+
key: jest-integration
124+
125+
- command: .buildkite/scripts/steps/test/api_integration.sh
126+
label: 'API Integration Tests'
127+
agents:
128+
queue: n2-2
129+
timeout_in_minutes: 120
130+
key: api-integration
131+
132+
- command: .buildkite/scripts/steps/test/jest.sh
133+
label: 'Jest Tests'
134+
agents:
135+
queue: c2-16
136+
timeout_in_minutes: 120
137+
key: jest
138+
139+
- command: .buildkite/scripts/steps/lint.sh
140+
label: 'Linting'
141+
agents:
142+
queue: n2-2
143+
key: linting
144+
145+
- command: .buildkite/scripts/steps/checks.sh
146+
label: 'Checks'
147+
agents:
148+
queue: c2-4
149+
key: checks
150+
151+
- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
152+
label: 'Build Storybooks'
153+
agents:
154+
queue: c2-4
155+
key: storybooks
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
steps:
2+
- wait: ~
3+
continue_on_failure: true
4+
5+
- command: .buildkite/scripts/lifecycle/post_build.sh
6+
label: Post-Build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/functional/security_solution.sh
3+
label: 'Security Solution Tests'
4+
agents:
5+
queue: ci-group-6
6+
depends_on: build
7+
timeout_in_minutes: 120
8+
retry:
9+
automatic:
10+
- exit_status: '*'
11+
limit: 1

0 commit comments

Comments
 (0)