2020-08-04 19:13:51 +02:00
|
|
|
def call(List<Closure> closures) {
|
|
|
|
withTaskQueue.addTasks(closures)
|
|
|
|
}
|
|
|
|
|
|
|
|
def check() {
|
|
|
|
tasks([
|
2020-12-04 15:43:33 +01:00
|
|
|
kibanaPipeline.scriptTask('Quick Commit Checks', 'test/scripts/checks/commit/commit.sh'),
|
2020-08-04 19:13:51 +02:00
|
|
|
kibanaPipeline.scriptTask('Check Telemetry Schema', 'test/scripts/checks/telemetry.sh'),
|
|
|
|
kibanaPipeline.scriptTask('Check TypeScript Projects', 'test/scripts/checks/ts_projects.sh'),
|
2020-12-02 20:42:23 +01:00
|
|
|
kibanaPipeline.scriptTask('Check Jest Configs', 'test/scripts/checks/jest_configs.sh'),
|
2020-08-04 19:13:51 +02:00
|
|
|
kibanaPipeline.scriptTask('Check Doc API Changes', 'test/scripts/checks/doc_api_changes.sh'),
|
2021-03-03 16:45:55 +01:00
|
|
|
kibanaPipeline.scriptTask('Check @kbn/pm Distributable', 'test/scripts/checks/kbn_pm_dist.sh'),
|
|
|
|
kibanaPipeline.scriptTask('Check Plugin List Docs', 'test/scripts/checks/plugin_list_docs.sh'),
|
2021-06-02 03:27:42 +02:00
|
|
|
kibanaPipeline.scriptTask('Check Types and Public API Docs', 'test/scripts/checks/type_check_plugin_public_api_docs.sh'),
|
2020-10-08 00:43:14 +02:00
|
|
|
kibanaPipeline.scriptTask('Check Bundle Limits', 'test/scripts/checks/bundle_limits.sh'),
|
2020-08-04 19:13:51 +02:00
|
|
|
kibanaPipeline.scriptTask('Check i18n', 'test/scripts/checks/i18n.sh'),
|
|
|
|
kibanaPipeline.scriptTask('Check File Casing', 'test/scripts/checks/file_casing.sh'),
|
|
|
|
kibanaPipeline.scriptTask('Check Licenses', 'test/scripts/checks/licenses.sh'),
|
2020-11-30 23:19:32 +01:00
|
|
|
kibanaPipeline.scriptTask('Check Plugins With Circular Dependencies', 'test/scripts/checks/plugins_with_circular_deps.sh'),
|
2020-08-04 19:13:51 +02:00
|
|
|
kibanaPipeline.scriptTask('Verify NOTICE', 'test/scripts/checks/verify_notice.sh'),
|
|
|
|
kibanaPipeline.scriptTask('Test Projects', 'test/scripts/checks/test_projects.sh'),
|
|
|
|
kibanaPipeline.scriptTask('Test Hardening', 'test/scripts/checks/test_hardening.sh'),
|
|
|
|
])
|
|
|
|
}
|
|
|
|
|
|
|
|
def lint() {
|
|
|
|
tasks([
|
|
|
|
kibanaPipeline.scriptTask('Lint: eslint', 'test/scripts/lint/eslint.sh'),
|
2021-01-15 18:52:29 +01:00
|
|
|
kibanaPipeline.scriptTask('Lint: stylelint', 'test/scripts/lint/stylelint.sh'),
|
2020-08-04 19:13:51 +02:00
|
|
|
])
|
|
|
|
}
|
|
|
|
|
|
|
|
def test() {
|
|
|
|
tasks([
|
2021-01-29 23:05:27 +01:00
|
|
|
// This task requires isolation because of hard-coded, conflicting ports and such, so let's use Docker here
|
2020-08-04 19:13:51 +02:00
|
|
|
kibanaPipeline.scriptTaskDocker('Jest Integration Tests', 'test/scripts/test/jest_integration.sh'),
|
|
|
|
kibanaPipeline.scriptTask('API Integration Tests', 'test/scripts/test/api_integration.sh'),
|
|
|
|
])
|
|
|
|
}
|
|
|
|
|
2021-02-23 17:00:03 +01:00
|
|
|
def ossCiGroups() {
|
2021-09-16 17:28:07 +02:00
|
|
|
def ciGroups = 1..11
|
2021-02-23 17:00:03 +01:00
|
|
|
tasks(ciGroups.collect { kibanaPipeline.ossCiGroupProcess(it, true) })
|
|
|
|
}
|
|
|
|
|
|
|
|
def xpackCiGroups() {
|
|
|
|
def ciGroups = 1..13
|
|
|
|
tasks(ciGroups.collect { kibanaPipeline.xpackCiGroupProcess(it, true) })
|
|
|
|
}
|
|
|
|
|
2021-05-03 19:53:22 +02:00
|
|
|
def xpackCiGroupDocker() {
|
|
|
|
task {
|
|
|
|
workers.ci(name: 'xpack-cigroups-docker', size: 'm', ramDisk: true) {
|
|
|
|
kibanaPipeline.downloadDefaultBuildArtifacts()
|
|
|
|
kibanaPipeline.bash("""
|
|
|
|
cd '${env.WORKSPACE}'
|
2021-05-12 21:24:25 +02:00
|
|
|
mkdir -p kibana-build
|
|
|
|
tar -xzf kibana-default.tar.gz -C kibana-build --strip=1
|
2021-05-03 19:53:22 +02:00
|
|
|
tar -xzf kibana-default-plugins.tar.gz -C kibana
|
|
|
|
""", "Extract Default Build artifacts")
|
|
|
|
kibanaPipeline.xpackCiGroupProcess('Docker', true)()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-04 19:13:51 +02:00
|
|
|
def functionalOss(Map params = [:]) {
|
2020-11-03 23:50:01 +01:00
|
|
|
def config = params ?: [
|
|
|
|
serverIntegration: true,
|
|
|
|
ciGroups: true,
|
|
|
|
firefox: true,
|
|
|
|
accessibility: true,
|
|
|
|
pluginFunctional: true,
|
|
|
|
visualRegression: false,
|
|
|
|
]
|
2020-08-04 19:13:51 +02:00
|
|
|
|
|
|
|
task {
|
|
|
|
if (config.ciGroups) {
|
2021-02-23 17:00:03 +01:00
|
|
|
ossCiGroups()
|
2020-08-04 19:13:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (config.firefox) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('oss-firefox', './test/scripts/jenkins_firefox_smoke.sh'))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config.accessibility) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('oss-accessibility', './test/scripts/jenkins_accessibility.sh'))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config.pluginFunctional) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('oss-pluginFunctional', './test/scripts/jenkins_plugin_functional.sh'))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config.visualRegression) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh'))
|
|
|
|
}
|
2020-11-03 23:50:01 +01:00
|
|
|
|
|
|
|
if (config.serverIntegration) {
|
2020-12-09 17:51:32 +01:00
|
|
|
task(kibanaPipeline.scriptTaskDocker('serverIntegration', './test/scripts/test/server_integration.sh'))
|
2020-11-03 23:50:01 +01:00
|
|
|
}
|
2020-08-04 19:13:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
def functionalXpack(Map params = [:]) {
|
|
|
|
def config = params ?: [
|
|
|
|
ciGroups: true,
|
|
|
|
firefox: true,
|
|
|
|
accessibility: true,
|
|
|
|
pluginFunctional: true,
|
|
|
|
savedObjectsFieldMetrics:true,
|
|
|
|
pageLoadMetrics: false,
|
|
|
|
visualRegression: false,
|
|
|
|
]
|
|
|
|
|
|
|
|
task {
|
|
|
|
if (config.ciGroups) {
|
2021-02-23 17:00:03 +01:00
|
|
|
xpackCiGroups()
|
2021-05-03 19:53:22 +02:00
|
|
|
xpackCiGroupDocker()
|
2020-08-04 19:13:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (config.firefox) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('xpack-firefox', './test/scripts/jenkins_xpack_firefox_smoke.sh'))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config.accessibility) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config.visualRegression) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh'))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config.savedObjectsFieldMetrics) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('xpack-savedObjectsFieldMetrics', './test/scripts/jenkins_xpack_saved_objects_field_metrics.sh'))
|
|
|
|
}
|
|
|
|
|
2020-12-29 20:19:12 +01:00
|
|
|
whenChanged([
|
|
|
|
'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',
|
|
|
|
]) {
|
|
|
|
if (githubPr.isPr()) {
|
2021-02-22 17:48:43 +01:00
|
|
|
task(kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypressChrome', './test/scripts/jenkins_security_solution_cypress_chrome.sh'))
|
2021-02-23 21:06:46 +01:00
|
|
|
// Temporarily disabled to figure out test flake
|
|
|
|
// task(kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypressFirefox', './test/scripts/jenkins_security_solution_cypress_firefox.sh'))
|
2020-12-29 20:19:12 +01:00
|
|
|
}
|
|
|
|
}
|
2021-08-11 05:40:20 +02:00
|
|
|
|
2021-10-11 19:55:06 +02:00
|
|
|
//temporarily disable apm e2e test since it's breaking.
|
|
|
|
// whenChanged([
|
|
|
|
// 'x-pack/plugins/apm/',
|
|
|
|
// ]) {
|
|
|
|
// if (githubPr.isPr()) {
|
|
|
|
// task(kibanaPipeline.functionalTestProcess('xpack-APMCypress', './test/scripts/jenkins_apm_cypress.sh'))
|
|
|
|
// }
|
|
|
|
// }
|
2021-09-30 13:58:38 +02:00
|
|
|
|
|
|
|
whenChanged([
|
|
|
|
'x-pack/plugins/uptime/',
|
|
|
|
]) {
|
|
|
|
if (githubPr.isPr()) {
|
|
|
|
task(kibanaPipeline.functionalTestProcess('xpack-UptimePlaywright', './test/scripts/jenkins_uptime_playwright.sh'))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-04 19:13:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-18 20:13:23 +01:00
|
|
|
def storybooksCi() {
|
|
|
|
task {
|
|
|
|
storybooks.buildAndUpload()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-04 19:13:51 +02:00
|
|
|
return this
|