-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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' into feat/upgrade-ecs-8.0
- Loading branch information
Showing
833 changed files
with
18,654 additions
and
15,780 deletions.
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
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,11 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/functional/apm_cypress.sh | ||
label: 'APM Cypress Tests' | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 |
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,155 @@ | ||
steps: | ||
- command: .buildkite/scripts/lifecycle/pre_build.sh | ||
label: Pre-Build | ||
|
||
- wait | ||
|
||
- command: .buildkite/scripts/steps/build_kibana.sh | ||
label: Build Kibana Distribution and Plugins | ||
agents: | ||
queue: c2-16 | ||
key: build | ||
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" | ||
|
||
- command: .buildkite/scripts/steps/functional/xpack_cigroup.sh | ||
label: 'Default CI Group' | ||
parallelism: 13 | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
key: default-cigroup | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: CI_GROUP=Docker .buildkite/scripts/steps/functional/xpack_cigroup.sh | ||
label: 'Docker CI Group' | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
key: default-cigroup-docker | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/oss_cigroup.sh | ||
label: 'OSS CI Group' | ||
parallelism: 11 | ||
agents: | ||
queue: ci-group-4d | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
key: oss-cigroup | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/oss_accessibility.sh | ||
label: 'OSS Accessibility Tests' | ||
agents: | ||
queue: ci-group-4d | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/xpack_accessibility.sh | ||
label: 'Default Accessibility Tests' | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/oss_firefox.sh | ||
label: 'OSS Firefox Tests' | ||
agents: | ||
queue: ci-group-4d | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/xpack_firefox.sh | ||
label: 'Default Firefox Tests' | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/oss_misc.sh | ||
label: 'OSS Misc Functional Tests' | ||
agents: | ||
queue: ci-group-4d | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/functional/xpack_saved_object_field_metrics.sh | ||
label: 'Saved Object Field Metrics' | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: .buildkite/scripts/steps/test/jest_integration.sh | ||
label: 'Jest Integration Tests' | ||
agents: | ||
queue: n2-4 | ||
timeout_in_minutes: 120 | ||
key: jest-integration | ||
|
||
- command: .buildkite/scripts/steps/test/api_integration.sh | ||
label: 'API Integration Tests' | ||
agents: | ||
queue: n2-2 | ||
timeout_in_minutes: 120 | ||
key: api-integration | ||
|
||
- command: .buildkite/scripts/steps/test/jest.sh | ||
label: 'Jest Tests' | ||
agents: | ||
queue: c2-16 | ||
timeout_in_minutes: 120 | ||
key: jest | ||
|
||
- command: .buildkite/scripts/steps/lint.sh | ||
label: 'Linting' | ||
agents: | ||
queue: n2-2 | ||
key: linting | ||
|
||
- command: .buildkite/scripts/steps/checks.sh | ||
label: 'Checks' | ||
agents: | ||
queue: c2-4 | ||
key: checks | ||
|
||
- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh | ||
label: 'Build Storybooks' | ||
agents: | ||
queue: c2-4 | ||
key: storybooks |
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 @@ | ||
steps: | ||
- wait: ~ | ||
continue_on_failure: true | ||
|
||
- command: .buildkite/scripts/lifecycle/post_build.sh | ||
label: Post-Build |
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,11 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/functional/security_solution.sh | ||
label: 'Security Solution Tests' | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 |
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
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,84 @@ | ||
const execSync = require('child_process').execSync; | ||
const fs = require('fs'); | ||
const { areChangesSkippable, doAnyChangesMatch } = require('kibana-buildkite-library'); | ||
|
||
const SKIPPABLE_PATHS = [ | ||
/^docs\//, | ||
/^rfcs\//, | ||
/^.ci\/.+\.yml$/, | ||
/^.ci\/es-snapshots\//, | ||
/^.ci\/pipeline-library\//, | ||
/^.ci\/Jenkinsfile_[^\/]+$/, | ||
/^\.github\//, | ||
/\.md$/, | ||
/^\.backportrc\.json$/, | ||
]; | ||
|
||
const REQUIRED_PATHS = [ | ||
// this file is auto-generated and changes to it need to be validated with CI | ||
/^docs\/developer\/plugin-list.asciidoc$/, | ||
// don't skip CI on prs with changes to plugin readme files /i is for case-insensitive matching | ||
/\/plugins\/[^\/]+\/readme\.(md|asciidoc)$/i, | ||
]; | ||
|
||
const getPipeline = (filename, removeSteps = true) => { | ||
const str = fs.readFileSync(filename).toString(); | ||
return removeSteps ? str.replace(/^steps:/, '') : str; | ||
}; | ||
|
||
const uploadPipeline = (pipelineContent) => { | ||
const str = | ||
typeof pipelineContent === 'string' ? pipelineContent : JSON.stringify(pipelineContent); | ||
|
||
execSync('buildkite-agent pipeline upload', { | ||
input: str, | ||
stdio: ['pipe', 'inherit', 'inherit'], | ||
}); | ||
}; | ||
|
||
(async () => { | ||
try { | ||
const skippable = await areChangesSkippable(SKIPPABLE_PATHS, REQUIRED_PATHS); | ||
|
||
if (skippable) { | ||
console.log('All changes in PR are skippable. Skipping CI.'); | ||
|
||
// Since we skip everything, including post-build, we need to at least make sure the commit status gets set | ||
execSync('BUILD_SUCCESSFUL=true .buildkite/scripts/lifecycle/commit_status_complete.sh', { | ||
stdio: 'inherit', | ||
}); | ||
process.exit(0); | ||
} | ||
|
||
const pipeline = []; | ||
|
||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false)); | ||
|
||
if ( | ||
await doAnyChangesMatch([ | ||
/^x-pack\/plugins\/security_solution/, | ||
/^x-pack\/test\/security_solution_cypress/, | ||
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/, | ||
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/, | ||
]) | ||
) { | ||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml')); | ||
} | ||
|
||
// Disabled for now, these are failing/disabled in Jenkins currently as well | ||
// if ( | ||
// await doAnyChangesMatch([ | ||
// /^x-pack\/plugins\/apm/, | ||
// ]) | ||
// ) { | ||
// pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml')); | ||
// } | ||
|
||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml')); | ||
|
||
uploadPipeline(pipeline.join('\n')); | ||
} catch (ex) { | ||
console.error('PR pipeline generation error', ex.message); | ||
process.exit(1); | ||
} | ||
})(); |
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,5 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
node .buildkite/scripts/pipelines/pull_request/pipeline.js |
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/steps/functional/common.sh | ||
|
||
export JOB=kibana-apm-cypress | ||
|
||
echo "--- APM Cypress Tests" | ||
|
||
cd "$XPACK_DIR" | ||
|
||
checks-reporter-with-killswitch "APM Cypress Tests" \ | ||
node plugins/apm/scripts/test/e2e.js |
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,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/steps/functional/common.sh | ||
|
||
export JOB=kibana-security-solution-chrome | ||
|
||
echo "--- Security Solution tests (Chrome)" | ||
|
||
cd "$XPACK_DIR" | ||
|
||
checks-reporter-with-killswitch "Security Solution Cypress Tests (Chrome)" \ | ||
node scripts/functional_tests \ | ||
--debug --bail \ | ||
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \ | ||
--config test/security_solution_cypress/cli_config.ts |
Oops, something went wrong.