diff --git a/.ci/Dockerfile b/.ci/Dockerfile
deleted file mode 100644
index 6717a953b615..000000000000
--- a/.ci/Dockerfile
+++ /dev/null
@@ -1,38 +0,0 @@
-# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
-# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
-
-ARG NODE_VERSION=10.23.1
-
-FROM node:${NODE_VERSION} AS base
-
-RUN apt-get update && \
- apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
- libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
- libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
- libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
- libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-8-jre && \
- rm -rf /var/lib/apt/lists/*
-
-RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
- && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
- && apt-get update \
- && apt-get install -y rsync jq bsdtar google-chrome-stable \
- --no-install-recommends \
- && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-RUN LATEST_VAULT_RELEASE=$(curl -s https://api.github.com/repos/hashicorp/vault/tags | jq --raw-output .[0].name[1:]) \
- && curl -L https://releases.hashicorp.com/vault/${LATEST_VAULT_RELEASE}/vault_${LATEST_VAULT_RELEASE}_linux_amd64.zip -o vault.zip \
- && unzip vault.zip \
- && rm vault.zip \
- && chmod +x vault \
- && mv vault /usr/local/bin/vault
-
-RUN groupadd -r kibana && useradd -r -g kibana kibana && mkdir /home/kibana && chown kibana:kibana /home/kibana
-
-COPY ./bash_standard_lib.sh /usr/local/bin/bash_standard_lib.sh
-RUN chmod +x /usr/local/bin/bash_standard_lib.sh
-
-COPY ./runbld /usr/local/bin/runbld
-RUN chmod +x /usr/local/bin/runbld
-
-USER kibana
diff --git a/.ci/Jenkinsfile_baseline_capture b/.ci/Jenkinsfile_baseline_capture
deleted file mode 100644
index 791cacf7abb4..000000000000
--- a/.ci/Jenkinsfile_baseline_capture
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/groovy
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load()
-
-kibanaPipeline(timeoutMinutes: 120) {
- githubCommitStatus.trackBuild(params.commit, 'kibana-ci-baseline') {
- ciStats.trackBuild {
- catchError {
- withEnv([
- 'CI_PARALLEL_PROCESS_NUMBER=1'
- ]) {
- parallel([
- 'oss-baseline': {
- workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
- kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
- }
- },
- 'xpack-baseline': {
- workers.ci(name: 'xpack-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
- kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
- }
- },
- ])
- }
- }
-
- kibanaPipeline.sendMail()
- slackNotifications.onFailure()
- }
- }
-}
diff --git a/.ci/Jenkinsfile_baseline_trigger b/.ci/Jenkinsfile_baseline_trigger
deleted file mode 100644
index 221b7a44e30d..000000000000
--- a/.ci/Jenkinsfile_baseline_trigger
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/groovy
-
-def MAXIMUM_COMMITS_TO_CHECK = 10
-def MAXIMUM_COMMITS_TO_BUILD = 5
-
-if (!params.branches_yaml) {
- error "'branches_yaml' parameter must be specified"
-}
-
-def additionalBranches = []
-
-def branches = readYaml(text: params.branches_yaml) + additionalBranches
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load()
-
-withGithubCredentials {
- branches.each { branch ->
- if (branch == '6.8') {
- // skip 6.8, it is tracked but we don't need snapshots for it and haven't backported
- // the baseline capture scripts to it.
- return;
- }
-
- stage(branch) {
- def commits = getCommits(branch, MAXIMUM_COMMITS_TO_CHECK, MAXIMUM_COMMITS_TO_BUILD)
-
- commits.take(MAXIMUM_COMMITS_TO_BUILD).each { commit ->
- catchErrors {
- githubCommitStatus.create(commit, 'pending', 'Baseline started.', 'kibana-ci-baseline')
-
- build(
- propagate: false,
- wait: false,
- job: 'elastic+kibana+baseline-capture',
- parameters: [
- string(name: 'branch_specifier', value: branch),
- string(name: 'commit', value: commit),
- ]
- )
- }
- }
- }
- }
-}
-
-def getCommits(String branch, maximumCommitsToCheck, maximumCommitsToBuild) {
- print "Getting latest commits for ${branch}..."
- def commits = githubApi.get("repos/elastic/kibana/commits?sha=${branch}").take(maximumCommitsToCheck).collect { it.sha }
- def commitsToBuild = []
-
- for (commit in commits) {
- print "Getting statuses for ${commit}"
- def status = githubApi.get("repos/elastic/kibana/statuses/${commit}").find { it.context == 'kibana-ci-baseline' }
- print "Commit '${commit}' already built? ${status ? 'Yes' : 'No'}"
-
- if (!status) {
- commitsToBuild << commit
- } else {
- // Stop at the first commit we find that's already been triggered
- break
- }
-
- if (commitsToBuild.size() >= maximumCommitsToBuild) {
- break
- }
- }
-
- return commitsToBuild.reverse() // We want the builds to trigger oldest-to-newest
-}
diff --git a/.ci/Jenkinsfile_coverage b/.ci/Jenkinsfile_coverage
deleted file mode 100644
index f2a58e7b6a7a..000000000000
--- a/.ci/Jenkinsfile_coverage
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/groovy
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load() // load from the Jenkins instance
-
-kibanaPipeline(timeoutMinutes: 180) {
- catchErrors {
- withEnv([
- 'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
- ]) {
- parallel([
- 'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
- 'x-pack-intake-agent': {
- withEnv([
- 'NODE_ENV=test' // Needed for jest tests only
- ]) {
- workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh')()
- }
- },
- 'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
- 'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
- 'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
- 'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
- 'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
- 'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
- 'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
- 'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
- 'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
- 'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
- 'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
- 'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
- 'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
- ]),
- 'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
- 'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
- 'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
- 'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
- 'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
- 'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
- 'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
- 'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
- 'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
- 'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
- 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
- ]),
- ])
- workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
- kibanaPipeline.downloadCoverageArtifacts()
- kibanaPipeline.bash(
- '''
- # bootstrap from x-pack folder
- source src/dev/ci_setup/setup_env.sh
- cd x-pack
- yarn kbn bootstrap --prefer-offline
- cd ..
- # extract archives
- mkdir -p /tmp/extracted_coverage
- echo extracting intakes
- tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- echo extracting kibana-oss-tests
- tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- echo extracting kibana-xpack-tests
- tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
- # replace path in json files to have valid html report
- pwd=$(pwd)
- du -sh /tmp/extracted_coverage/target/kibana-coverage/
- echo replacing path in json files
- for i in {1..9}; do
- sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
- done
- wait
- # merge oss & x-pack reports
- echo merging coverage reports
- yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
- yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
- echo copy mocha reports
- mkdir -p target/kibana-coverage/mocha-combined
- cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
- ''',
- "run `yarn kbn bootstrap && merge coverage`"
- )
- sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
- kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
- sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
- kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
- sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
- kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
- }
- }
- }
- kibanaPipeline.sendMail()
-}
diff --git a/.ci/Jenkinsfile_flaky b/.ci/Jenkinsfile_flaky
deleted file mode 100644
index 2f496329dfd8..000000000000
--- a/.ci/Jenkinsfile_flaky
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/groovy
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load()
-
-def CI_GROUP_PARAM = params.CI_GROUP
-
-// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke', or 'all:serverMocha'
-def JOB_PARTS = CI_GROUP_PARAM.split(':')
-def IS_XPACK = JOB_PARTS[0] == 'xpack'
-def JOB = JOB_PARTS[1]
-def NEED_BUILD = JOB != 'serverMocha'
-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}
Agents: ${AGENT_COUNT}
Executions: ${params.NUMBER_EXECUTIONS}"
-
-kibanaPipeline(timeoutMinutes: 180) {
- 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}"] = {
- catchErrors {
- print "Agent ${agentNumberInside} - ${agentExecutions} executions"
-
- workers.functional('flaky-test-runner', {
- if (NEED_BUILD) {
- if (!IS_XPACK) {
- kibanaPipeline.buildOss()
- if (CI_GROUP == '1') {
- runbld("./test/scripts/jenkins_build_kbn_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 == 'serverMocha') {
- return kibanaPipeline.functionalTestProcess('serverMocha', {
- kibanaPipeline.bash(
- """
- source src/dev/ci_setup/setup_env.sh
- node scripts/mocha
- """,
- "run `node scripts/mocha`"
- )
- })
- } else if (job == 'accessibility') {
- return kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh')
- } else if (job == 'firefoxSmoke') {
- return kibanaPipeline.functionalTestProcess('firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh')
- } else if(job == 'visualRegression') {
- return kibanaPipeline.functionalTestProcess('visualRegression', './test/scripts/jenkins_visual_regression.sh')
- } else {
- return kibanaPipeline.ossCiGroupProcess(ciGroup)
- }
- }
-
- if (job == 'accessibility') {
- return kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh')
- } else if (job == 'firefoxSmoke') {
- return kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh')
- } else if(job == 'visualRegression') {
- return kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')
- } else {
- return kibanaPipeline.xpackCiGroupProcess(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 = floor(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([
- "REMOVE_KIBANA_INSTALL_DIR=1",
- ]) {
- catchErrors {
- 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()
-}
diff --git a/.ci/Jenkinsfile_security_cypress b/.ci/Jenkinsfile_security_cypress
deleted file mode 100644
index d7f702a56563..000000000000
--- a/.ci/Jenkinsfile_security_cypress
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/groovy
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load()
-
-kibanaPipeline(timeoutMinutes: 180) {
- slackNotifications.onFailure(
- disabled: !params.NOTIFY_ON_FAILURE,
- channel: '#security-solution-slack-testing'
- ) {
- catchError {
- withEnv([
- 'CI_PARALLEL_PROCESS_NUMBER=1'
- ]) {
- def job = 'xpack-securityCypress'
-
- workers.ci(name: job, size: 'l', ramDisk: true) {
- kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
- kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress.sh')()
- }
- }
- }
- }
-
- if (params.NOTIFY_ON_FAILURE) {
- kibanaPipeline.sendMail(to: 'siem_dev_team@elastic.co')
- }
-}
diff --git a/.ci/build_docker.sh b/.ci/build_docker.sh
deleted file mode 100755
index 1f45182aad84..000000000000
--- a/.ci/build_docker.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-cd "$(dirname "${0}")"
-
-cp /usr/local/bin/runbld ./
-cp /usr/local/bin/bash_standard_lib.sh ./
-
-docker build -t kibana-ci -f ./Dockerfile .
diff --git a/.ci/end2end.groovy b/.ci/end2end.groovy
deleted file mode 100644
index 63ee2ca48659..000000000000
--- a/.ci/end2end.groovy
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/env groovy
-
-library identifier: 'apm@current',
-retriever: modernSCM(
- [$class: 'GitSCMSource',
- credentialsId: 'f94e9298-83ae-417e-ba91-85c279771570',
- id: '37cf2c00-2cc7-482e-8c62-7bbffef475e2',
- remote: 'git@github.com:elastic/apm-pipeline-library.git'])
-
-pipeline {
- agent { label 'linux && immutable' }
- environment {
- BASE_DIR = 'src/github.com/elastic/kibana'
- HOME = "${env.WORKSPACE}"
- E2E_DIR = 'x-pack/plugins/apm/e2e'
- PIPELINE_LOG_LEVEL = 'DEBUG'
- KBN_OPTIMIZER_THEMES = 'v7light'
- }
- options {
- timeout(time: 1, unit: 'HOURS')
- buildDiscarder(logRotator(numToKeepStr: '40', artifactNumToKeepStr: '20', daysToKeepStr: '30'))
- timestamps()
- ansiColor('xterm')
- disableResume()
- durabilityHint('PERFORMANCE_OPTIMIZED')
- }
- triggers {
- issueCommentTrigger('(?i)(retest|.*jenkins\\W+run\\W+(?:the\\W+)?e2e?.*)')
- }
- parameters {
- booleanParam(name: 'FORCE', defaultValue: false, description: 'Whether to force the run.')
- }
- stages {
- stage('Checkout') {
- options { skipDefaultCheckout() }
- steps {
- deleteDir()
- gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: false,
- shallow: false, reference: "/var/lib/jenkins/.git-references/kibana.git")
-
- // Filter when to run based on the below reasons:
- // - On a PRs when:
- // - There are changes related to the APM UI project
- // - only when the owners of those changes are members of the given GitHub teams
- // - On merges to branches when:
- // - There are changes related to the APM UI project
- // - FORCE parameter is set to true.
- script {
- def apm_updated = false
- dir("${BASE_DIR}"){
- apm_updated = isGitRegionMatch(patterns: [ "^x-pack/plugins/apm/.*" ])
- }
- if (isPR()) {
- def isMember = isMemberOf(user: env.CHANGE_AUTHOR, team: ['apm-ui', 'uptime'])
- setEnvVar('RUN_APM_E2E', params.FORCE || (apm_updated && isMember))
- } else {
- setEnvVar('RUN_APM_E2E', params.FORCE || apm_updated)
- }
- }
- }
- }
- stage('Prepare Kibana') {
- options { skipDefaultCheckout() }
- when { expression { return env.RUN_APM_E2E != "false" } }
- environment {
- JENKINS_NODE_COOKIE = 'dontKillMe'
- }
- steps {
- notifyStatus('Preparing kibana', 'PENDING')
- dir("${BASE_DIR}"){
- sh "${E2E_DIR}/ci/prepare-kibana.sh"
- }
- }
- post {
- unsuccessful {
- notifyStatus('Kibana warm up failed', 'FAILURE')
- }
- }
- }
- stage('Smoke Tests'){
- options { skipDefaultCheckout() }
- when { expression { return env.RUN_APM_E2E != "false" } }
- steps{
- notifyTestStatus('Running smoke tests', 'PENDING')
- dir("${BASE_DIR}"){
- sh "${E2E_DIR}/ci/run-e2e.sh"
- }
- }
- post {
- always {
- dir("${BASE_DIR}/${E2E_DIR}"){
- archiveArtifacts(allowEmptyArchive: false, artifacts: 'cypress/screenshots/**,cypress/videos/**,cypress/test-results/*e2e-tests.xml')
- junit(allowEmptyResults: true, testResults: 'cypress/test-results/*e2e-tests.xml')
- dir('tmp/apm-integration-testing'){
- sh 'docker-compose logs > apm-its-docker.log || true'
- sh 'docker-compose down -v || true'
- archiveArtifacts(allowEmptyArchive: true, artifacts: 'apm-its-docker.log')
- }
- archiveArtifacts(allowEmptyArchive: true, artifacts: 'tmp/*.log')
- }
- }
- unsuccessful {
- notifyTestStatus('Test failures', 'FAILURE')
- }
- success {
- notifyTestStatus('Tests passed', 'SUCCESS')
- }
- }
- }
- }
- post {
- always {
- dir("${BASE_DIR}"){
- archiveArtifacts(allowEmptyArchive: true, artifacts: "${E2E_DIR}/kibana.log")
- }
- }
- }
-}
-
-def notifyStatus(String description, String status) {
- withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('pipeline'))
-}
-
-def notifyTestStatus(String description, String status) {
- withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
-}
diff --git a/.ci/es-snapshots/Jenkinsfile_build_es b/.ci/es-snapshots/Jenkinsfile_build_es
deleted file mode 100644
index aafdf06433c6..000000000000
--- a/.ci/es-snapshots/Jenkinsfile_build_es
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/bin/groovy
-
-// This job effectively has two SCM configurations:
-// one for kibana, used to check out this Jenkinsfile (which means it's the job's main SCM configuration), as well as kick-off the downstream verification job
-// one for elasticsearch, used to check out the elasticsearch source before building it
-
-// There are two parameters that drive which branch is checked out for each of these, but they will typically be the same
-// 'branch_specifier' is for kibana / the job itself
-// ES_BRANCH is for elasticsearch
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load()
-
-def ES_BRANCH = params.ES_BRANCH
-
-if (!ES_BRANCH) {
- error "Parameter 'ES_BRANCH' must be specified."
-}
-
-currentBuild.displayName += " - ${ES_BRANCH}"
-currentBuild.description = "ES: ${ES_BRANCH}
Kibana: ${params.branch_specifier}"
-
-def PROMOTE_WITHOUT_VERIFY = !!params.PROMOTE_WITHOUT_VERIFICATION
-
-timeout(time: 120, unit: 'MINUTES') {
- timestamps {
- ansiColor('xterm') {
- node(workers.label('l')) {
- catchErrors {
- def VERSION
- def SNAPSHOT_ID
- def DESTINATION
-
- def scmVars = checkoutEs(ES_BRANCH)
- def GIT_COMMIT = scmVars.GIT_COMMIT
- def GIT_COMMIT_SHORT = sh(script: "git rev-parse --short ${GIT_COMMIT}", returnStdout: true).trim()
-
- buildArchives('to-archive')
-
- dir('to-archive') {
- def now = new Date()
- def date = now.format("yyyyMMdd-HHmmss")
-
- def filesRaw = sh(script: "ls -1", returnStdout: true).trim()
- def files = filesRaw
- .split("\n")
- .collect { filename ->
- // Filename examples
- // elasticsearch-oss-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
- // elasticsearch-8.0.0-SNAPSHOT-linux-x86_64.tar.gz
- def parts = filename.replace("elasticsearch-oss", "oss").split("-")
-
- VERSION = VERSION ?: parts[1]
- SNAPSHOT_ID = SNAPSHOT_ID ?: "${date}_${GIT_COMMIT_SHORT}"
- DESTINATION = DESTINATION ?: "${VERSION}/archives/${SNAPSHOT_ID}"
-
- return [
- filename: filename,
- checksum: filename + '.sha512',
- url: "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${DESTINATION}/${filename}".toString(),
- version: parts[1],
- platform: parts[3],
- architecture: parts[4].split('\\.')[0],
- license: parts[0] == 'oss' ? 'oss' : 'default',
- ]
- }
-
- sh 'find * -exec bash -c "shasum -a 512 {} > {}.sha512" \\;'
-
- def manifest = [
- bucket: "kibana-ci-es-snapshots-daily/${DESTINATION}".toString(),
- branch: ES_BRANCH,
- sha: GIT_COMMIT,
- sha_short: GIT_COMMIT_SHORT,
- version: VERSION,
- generated: now.format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC")),
- archives: files,
- ]
- def manifestJson = toJSON(manifest).toString()
- writeFile file: 'manifest.json', text: manifestJson
-
- upload(DESTINATION, '*.*')
-
- sh "cp manifest.json manifest-latest.json"
- upload(VERSION, 'manifest-latest.json')
- }
-
- if (PROMOTE_WITHOUT_VERIFY) {
- esSnapshots.promote(VERSION, SNAPSHOT_ID)
-
- emailext(
- to: 'build-kibana@elastic.co',
- subject: "ES snapshot promoted without verification: ${params.ES_BRANCH}",
- body: '${SCRIPT,template="groovy-html.template"}',
- mimeType: 'text/html',
- )
- } else {
- build(
- propagate: false,
- wait: false,
- job: 'elasticsearch+snapshots+verify',
- parameters: [
- string(name: 'branch_specifier', value: branch_specifier),
- string(name: 'SNAPSHOT_VERSION', value: VERSION),
- string(name: 'SNAPSHOT_ID', value: SNAPSHOT_ID),
- ]
- )
- }
- }
-
- kibanaPipeline.sendMail()
- }
- }
- }
-}
-
-def checkoutEs(branch) {
- retryWithDelay(8, 15) {
- return checkout([
- $class: 'GitSCM',
- branches: [[name: branch]],
- doGenerateSubmoduleConfigurations: false,
- extensions: [],
- submoduleCfg: [],
- userRemoteConfigs: [[
- credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
- url: 'git@github.com:elastic/elasticsearch',
- ]],
- ])
- }
-}
-
-def upload(destination, pattern) {
- return googleStorageUpload(
- credentialsId: 'kibana-ci-gcs-plugin',
- bucket: "gs://kibana-ci-es-snapshots-daily/${destination}",
- pattern: pattern,
- sharedPublicly: false,
- showInline: false,
- )
-}
-
-def buildArchives(destination) {
- def props = readProperties file: '.ci/java-versions.properties'
- withEnv([
- // Select the correct JDK for this branch
- "PATH=/var/lib/jenkins/.java/${props.ES_BUILD_JAVA}/bin:${env.PATH}",
-
- // These Jenkins env vars trigger some automation in the elasticsearch repo that we don't want
- "BUILD_NUMBER=",
- "JENKINS_URL=",
- "BUILD_URL=",
- "JOB_NAME=",
- "NODE_NAME=",
- ]) {
- sh """
- ./gradlew -Dbuild.docker=true assemble --parallel
- mkdir -p ${destination}
- find distribution -type f \\( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \\) -not -path *no-jdk* -not -path *build-context* -exec cp {} ${destination} \\;
- docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:\${0} | gzip > ${destination}/elasticsearch-\${0}-docker-image.tar.gz'
- """
- }
-}
diff --git a/.ci/es-snapshots/Jenkinsfile_trigger_build_es b/.ci/es-snapshots/Jenkinsfile_trigger_build_es
deleted file mode 100644
index 186917e96782..000000000000
--- a/.ci/es-snapshots/Jenkinsfile_trigger_build_es
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/groovy
-
-if (!params.branches_yaml) {
- error "'branches_yaml' parameter must be specified"
-}
-
-def branches = readYaml text: params.branches_yaml
-
-branches.each { branch ->
- build(
- propagate: false,
- wait: false,
- job: 'elasticsearch+snapshots+build',
- parameters: [
- string(name: 'branch_specifier', value: branch),
- string(name: 'ES_BRANCH', value: branch),
- ]
- )
-}
diff --git a/.ci/es-snapshots/Jenkinsfile_verify_es b/.ci/es-snapshots/Jenkinsfile_verify_es
deleted file mode 100644
index a6fe980242af..000000000000
--- a/.ci/es-snapshots/Jenkinsfile_verify_es
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/groovy
-
-library 'kibana-pipeline-library'
-kibanaLibrary.load()
-
-def SNAPSHOT_VERSION = params.SNAPSHOT_VERSION
-def SNAPSHOT_ID = params.SNAPSHOT_ID
-
-if (!SNAPSHOT_VERSION) {
- error "Parameter SNAPSHOT_VERSION must be specified"
-}
-
-if (!SNAPSHOT_ID) {
- error "Parameter SNAPSHOT_ID must be specified"
-}
-
-currentBuild.displayName += " - ${SNAPSHOT_VERSION}"
-currentBuild.description = "ES: ${SNAPSHOT_VERSION}
Kibana: ${params.branch_specifier}"
-
-def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${SNAPSHOT_VERSION}/archives/${SNAPSHOT_ID}/manifest.json"
-
-kibanaPipeline(timeoutMinutes: 150) {
- catchErrors {
- slackNotifications.onFailure(
- title: "*<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*",
- message: "[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure",
- ) {
- retryable.enable(2)
- withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
- parallel([
- 'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
- 'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
- 'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
- 'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
- 'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
- 'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
- 'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
- 'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
- 'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
- 'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
- 'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
- 'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
- 'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
- 'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
- 'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
- ]),
- 'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
- 'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
- 'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
- 'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
- 'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
- 'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
- 'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
- 'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
- 'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
- 'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
- 'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
- ]),
- ])
- }
-
- promoteSnapshot(SNAPSHOT_VERSION, SNAPSHOT_ID)
- }
- }
-
- kibanaPipeline.sendMail()
-}
-
-def promoteSnapshot(snapshotVersion, snapshotId) {
- node(workers.label('s')) {
- esSnapshots.promote(snapshotVersion, snapshotId)
- }
-}
diff --git a/.ci/jobs.yml b/.ci/jobs.yml
deleted file mode 100644
index 6e54a131d157..000000000000
--- a/.ci/jobs.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# This file is needed by functionalTests:ensureAllTestsInCiGroup for the list of ciGroups. That must be changed before this file can be removed
-
-JOB:
- - kibana-intake
- - x-pack-intake
- - kibana-firefoxSmoke
- - kibana-ciGroup1
- - kibana-ciGroup2
- - kibana-ciGroup3
- - kibana-ciGroup4
- - kibana-ciGroup5
- - kibana-ciGroup6
- - kibana-ciGroup7
- - kibana-ciGroup8
- - kibana-ciGroup9
- - kibana-ciGroup10
- - kibana-ciGroup11
- - kibana-ciGroup12
- - kibana-accessibility
- - kibana-visualRegression
-
- # make sure all x-pack-ciGroups are listed in test/scripts/jenkins_xpack_ci_group.sh
- - x-pack-firefoxSmoke
- - x-pack-ciGroup1
- - x-pack-ciGroup2
- - x-pack-ciGroup3
- - x-pack-ciGroup4
- - x-pack-ciGroup5
- - x-pack-ciGroup6
- - x-pack-ciGroup7
- - x-pack-ciGroup8
- - x-pack-ciGroup9
- - x-pack-ciGroup10
- - x-pack-accessibility
- - x-pack-visualRegression
-
-# `~` is yaml for `null`
-exclude: ~
\ No newline at end of file
diff --git a/.ci/packer_cache.sh b/.ci/packer_cache.sh
deleted file mode 100755
index 5f091cc2e11a..000000000000
--- a/.ci/packer_cache.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-branch="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
-
-# run setup script that gives us node, yarn, and bootstraps the project
-source src/dev/ci_setup/setup.sh;
-
-# download es snapshots
-node scripts/es snapshot --download-only;
-node scripts/es snapshot --license=oss --download-only;
-
-# download reporting browsers
-(cd "x-pack" && yarn gulp prepare);
-
-# cache the chromedriver archive
-chromedriverDistVersion="$(node -e "console.log(require('chromedriver').version)")"
-chromedriverPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.chromedriver)")"
-if [ -z "$chromedriverDistVersion" ] || [ -z "$chromedriverPkgVersion" ]; then
- echo "UNABLE TO DETERMINE CHROMEDRIVER VERSIONS"
- exit 1
-fi
-mkdir -p .chromedriver
-curl "https://chromedriver.storage.googleapis.com/$chromedriverDistVersion/chromedriver_linux64.zip" > .chromedriver/chromedriver.zip
-echo "$chromedriverPkgVersion" > .chromedriver/pkgVersion
-
-# cache the geckodriver archive
-geckodriverPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.geckodriver)")"
-if [ -z "$geckodriverPkgVersion" ]; then
- echo "UNABLE TO DETERMINE geckodriver VERSIONS"
- exit 1
-fi
-mkdir -p ".geckodriver"
-cp "node_modules/geckodriver/geckodriver.tar.gz" .geckodriver/geckodriver.tar.gz
-echo "$geckodriverPkgVersion" > .geckodriver/pkgVersion
-
-# archive cacheable directories
-mkdir -p "$HOME/.kibana/bootstrap_cache"
-tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
- node_modules \
- packages/*/node_modules \
- x-pack/node_modules \
- x-pack/legacy/plugins/*/node_modules \
- x-pack/plugins/reporting/.chromium \
- test/plugin_functional/plugins/*/node_modules \
- examples/*/node_modules \
- .es \
- .chromedriver \
- .geckodriver;
-
-echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"
-
-if [ "$branch" == "master" ]; then
- echo "Creating bootstrap cache for 7.x";
-
- git clone https://github.com/elastic/kibana.git --branch 7.x --depth 1 /tmp/kibana-7.x
- (cd /tmp/kibana-7.x && ./.ci/packer_cache.sh);
- rm -rf /tmp/kibana-7.x;
-fi
diff --git a/.ci/packer_cache_for_branch.sh b/.ci/packer_cache_for_branch.sh
deleted file mode 100755
index 0d9b22b04dbd..000000000000
--- a/.ci/packer_cache_for_branch.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-branch="$1"
-checkoutDir="$(pwd)"
-
-if [[ "$branch" != "master" ]]; then
- checkoutDir="/tmp/kibana-$branch"
- git clone https://github.com/elastic/kibana.git --branch "$branch" --depth 1 "$checkoutDir"
- cd "$checkoutDir"
-fi
-
-source src/dev/ci_setup/setup.sh;
-
-# download es snapshots
-node scripts/es snapshot --download-only;
-node scripts/es snapshot --license=oss --download-only;
-
-# download reporting browsers
-(cd "x-pack" && node ../node_modules/.bin/gulp downloadChromium);
-
-# cache the chromedriver archive
-chromedriverDistVersion="$(node -e "console.log(require('chromedriver').version)")"
-chromedriverPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.chromedriver)")"
-if [ -z "$chromedriverDistVersion" ] || [ -z "$chromedriverPkgVersion" ]; then
- echo "UNABLE TO DETERMINE CHROMEDRIVER VERSIONS"
- exit 1
-fi
-mkdir -p .chromedriver
-curl "https://chromedriver.storage.googleapis.com/$chromedriverDistVersion/chromedriver_linux64.zip" > .chromedriver/chromedriver.zip
-echo "$chromedriverPkgVersion" > .chromedriver/pkgVersion
-
-# cache the geckodriver archive
-geckodriverPkgVersion="$(node -e "console.log(require('./package.json').devDependencies.geckodriver)")"
-if [ -z "$geckodriverPkgVersion" ]; then
- echo "UNABLE TO DETERMINE geckodriver VERSIONS"
- exit 1
-fi
-mkdir -p ".geckodriver"
-cp "node_modules/geckodriver/geckodriver.tar.gz" .geckodriver/geckodriver.tar.gz
-echo "$geckodriverPkgVersion" > .geckodriver/pkgVersion
-
-echo "Creating bootstrap_cache archive"
-
-# archive cacheable directories
-mkdir -p "$HOME/.kibana/bootstrap_cache"
-tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
- .chromium \
- .es \
- .chromedriver \
- .geckodriver;
-
-echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"
-
-.ci/build_docker.sh
-
-if [[ "$branch" != "master" ]]; then
- rm --preserve-root -rf "$checkoutDir"
-fi
diff --git a/.ci/pipeline-library/README.md b/.ci/pipeline-library/README.md
deleted file mode 100644
index 71d7c39e37f4..000000000000
--- a/.ci/pipeline-library/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Kibana Jenkins Pipeline Library
-
-## Running tests
-
-```bash
-cd .ci/pipeline-library
-./gradlew test
-```
\ No newline at end of file
diff --git a/.ci/pipeline-library/build.gradle b/.ci/pipeline-library/build.gradle
deleted file mode 100644
index ac5e7a4ed034..000000000000
--- a/.ci/pipeline-library/build.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-plugins {
- id 'groovy'
- id 'idea'
-}
-
-group = 'co.elastic.kibana.pipeline'
-version = '0.0.1'
-
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
-
-repositories {
- maven { url 'https://repo.jenkins-ci.org/releases/' }
- maven { url 'https://repo.maven.apache.org/maven2' }
-}
-
-dependencies {
- implementation 'org.codehaus.groovy:groovy-all:2.4.12'
- implementation 'org.jenkins-ci.main:jenkins-core:2.23'
- implementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:2.19@jar'
- testImplementation 'com.lesfurets:jenkins-pipeline-unit:1.4'
- testImplementation 'junit:junit:4.12'
- testImplementation 'org.mockito:mockito-core:2.+'
- testImplementation 'org.assertj:assertj-core:3.15+' // Temporary https://github.com/jenkinsci/JenkinsPipelineUnit/issues/209
-}
-
-sourceSets {
- main {
- groovy {
- srcDirs = ['vars']
- }
- }
-
- test {
- groovy {
- srcDirs = ['src/test']
- }
- }
-}
-
-test {
- testLogging {
- events 'passed', 'skipped', 'failed'
- exceptionFormat = 'full'
- }
-}
diff --git a/.ci/pipeline-library/gradle/wrapper/gradle-wrapper.jar b/.ci/pipeline-library/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 62d4c053550b..000000000000
Binary files a/.ci/pipeline-library/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/.ci/pipeline-library/gradle/wrapper/gradle-wrapper.properties b/.ci/pipeline-library/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index a4f0001d203b..000000000000
--- a/.ci/pipeline-library/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/.ci/pipeline-library/gradlew b/.ci/pipeline-library/gradlew
deleted file mode 100755
index fbd7c515832d..000000000000
--- a/.ci/pipeline-library/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/.ci/pipeline-library/gradlew.bat b/.ci/pipeline-library/gradlew.bat
deleted file mode 100644
index a9f778a7a964..000000000000
--- a/.ci/pipeline-library/gradlew.bat
+++ /dev/null
@@ -1,104 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/.ci/pipeline-library/src/test/KibanaBasePipelineTest.groovy b/.ci/pipeline-library/src/test/KibanaBasePipelineTest.groovy
deleted file mode 100644
index 4112cb3c0e14..000000000000
--- a/.ci/pipeline-library/src/test/KibanaBasePipelineTest.groovy
+++ /dev/null
@@ -1,113 +0,0 @@
-import com.lesfurets.jenkins.unit.*
-import org.junit.Before
-
-class KibanaBasePipelineTest extends BasePipelineTest {
- Map env = [:]
- Map params = [:]
-
- public def Mocks = [
- TEST_FAILURE_URL: 'https://localhost/',
- TEST_FAILURE_NAME: 'Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/fake/test·ts.Fake test should & pass &',
- ]
-
- @Before
- void setUp() {
- super.setUp()
-
- env.BRANCH_NAME = 'master'
- env.BUILD_ID = '1'
- env.BUILD_DISPLAY_NAME = "#${env.BUILD_ID}"
-
- env.JENKINS_URL = 'http://jenkins.localhost:8080'
- env.BUILD_URL = "${env.JENKINS_URL}/job/elastic+kibana+${env.BRANCH_NAME}/${env.BUILD_ID}/".toString()
-
- env.JOB_BASE_NAME = "elastic / kibana # ${env.BRANCH_NAME}".toString()
- env.JOB_NAME = env.JOB_BASE_NAME
-
- env.WORKSPACE = 'WS'
-
- props([
- buildUtils: [
- getBuildStatus: { 'SUCCESS' },
- printStacktrace: { ex -> print ex },
- ],
- githubPr: [
- isPr: { false },
- ],
- jenkinsApi: [ getFailedSteps: { [] } ],
- testUtils: [ getFailures: { [] } ],
- ])
-
- vars([
- env: env,
- params: params,
- ])
-
- // Some wrappers that can just be mocked to immediately call the closure passed in
- [
- 'catchError',
- 'catchErrors',
- 'timestamps',
- 'withGithubCredentials',
- ].each {
- helper.registerAllowedMethod(it, [Closure.class], null)
- }
- }
-
- void props(Map properties) {
- properties.each {
- binding.setProperty(it.key, it.value)
- }
- }
-
- void prop(String propertyName, Object propertyValue) {
- binding.setProperty(propertyName, propertyValue)
- }
-
- void vars(Map variables) {
- variables.each {
- binding.setVariable(it.key, it.value)
- }
- }
-
- void var(String variableName, Object variableValue) {
- binding.setVariable(variableName, variableValue)
- }
-
- def fnMock(String name) {
- return helper.callStack.find { it.methodName == name }
- }
-
- def fnMocks(String name) {
- helper.callStack.findAll { it.methodName == name }
- }
-
- void mockFailureBuild() {
- props([
- buildUtils: [
- getBuildStatus: { 'FAILURE' },
- printStacktrace: { ex -> print ex },
- ],
- jenkinsApi: [ getFailedSteps: { [
- [
- displayName: 'Check out from version control',
- logs: 'http://jenkins.localhost:8080',
- ],
- [
- displayName: 'Execute test task',
- logs: 'http://jenkins.localhost:8080',
- ],
- ] } ],
- testUtils: [
- getFailures: {
- return [
- [
- url: Mocks.TEST_FAILURE_URL,
- fullDisplayName: Mocks.TEST_FAILURE_NAME,
- ]
- ]
- },
- ],
- ])
- }
-}
diff --git a/.ci/pipeline-library/src/test/buildState.groovy b/.ci/pipeline-library/src/test/buildState.groovy
deleted file mode 100644
index b748cce29e7f..000000000000
--- a/.ci/pipeline-library/src/test/buildState.groovy
+++ /dev/null
@@ -1,48 +0,0 @@
-import org.junit.*
-import static groovy.test.GroovyAssert.*
-
-class BuildStateTest extends KibanaBasePipelineTest {
- def buildState
-
- @Before
- void setUp() {
- super.setUp()
-
- buildState = loadScript("vars/buildState.groovy")
- }
-
- @Test
- void 'get() returns existing data'() {
- buildState.add('test', 1)
- def actual = buildState.get('test')
- assertEquals(1, actual)
- }
-
- @Test
- void 'get() returns null for missing data'() {
- def actual = buildState.get('missing_key')
- assertEquals(null, actual)
- }
-
- @Test
- void 'add() does not overwrite existing keys'() {
- assertTrue(buildState.add('test', 1))
- assertFalse(buildState.add('test', 2))
-
- def actual = buildState.get('test')
-
- assertEquals(1, actual)
- }
-
- @Test
- void 'set() overwrites existing keys'() {
- assertFalse(buildState.has('test'))
- buildState.set('test', 1)
- assertTrue(buildState.has('test'))
- buildState.set('test', 2)
-
- def actual = buildState.get('test')
-
- assertEquals(2, actual)
- }
-}
diff --git a/.ci/pipeline-library/src/test/githubCommitStatus.groovy b/.ci/pipeline-library/src/test/githubCommitStatus.groovy
deleted file mode 100644
index c770d5596f9c..000000000000
--- a/.ci/pipeline-library/src/test/githubCommitStatus.groovy
+++ /dev/null
@@ -1,87 +0,0 @@
-import org.junit.*
-import static org.mockito.Mockito.*;
-
-class GithubCommitStatusTest extends KibanaBasePipelineTest {
- def githubCommitStatus
- def githubApiMock
- def buildStateMock
-
- def EXPECTED_STATUS_URL = 'repos/elastic/kibana/statuses/COMMIT_HASH'
- def EXPECTED_CONTEXT = 'kibana-ci'
- def EXPECTED_BUILD_URL = 'http://jenkins.localhost:8080/job/elastic+kibana+master/1/'
-
- interface BuildState {
- Object get(String key)
- Object has(String key)
- }
-
- interface GithubApi {
- Object post(String url, Map data)
- }
-
- @Before
- void setUp() {
- super.setUp()
-
- buildStateMock = mock(BuildState)
- githubApiMock = mock(GithubApi)
-
- when(buildStateMock.has('checkoutInfo')).thenReturn(true)
- when(buildStateMock.get('checkoutInfo')).thenReturn([ commit: 'COMMIT_HASH', ])
- when(githubApiMock.post(any(), any())).thenReturn(null)
-
- props([
- buildState: buildStateMock,
- githubApi: githubApiMock,
- ])
-
- githubCommitStatus = loadScript("vars/githubCommitStatus.groovy")
- }
-
- void verifyStatusCreate(String state, String description) {
- verify(githubApiMock).post(
- EXPECTED_STATUS_URL,
- [
- 'state': state,
- 'description': description,
- 'context': EXPECTED_CONTEXT,
- 'target_url': EXPECTED_BUILD_URL,
- ]
- )
- }
-
- @Test
- void 'onStart() should create a pending status'() {
- githubCommitStatus.onStart()
- verifyStatusCreate('pending', 'Build started.')
- }
-
- @Test
- void 'onFinish() should create a success status'() {
- githubCommitStatus.onFinish()
- verifyStatusCreate('success', 'Build completed successfully.')
- }
-
- @Test
- void 'onFinish() should create an error status for failed builds'() {
- mockFailureBuild()
- githubCommitStatus.onFinish()
- verifyStatusCreate('error', 'Build failed.')
- }
-
- @Test
- void 'onStart() should exit early for PRs'() {
- prop('githubPr', [ isPr: { true } ])
-
- githubCommitStatus.onStart()
- verifyZeroInteractions(githubApiMock)
- }
-
- @Test
- void 'onFinish() should exit early for PRs'() {
- prop('githubPr', [ isPr: { true } ])
-
- githubCommitStatus.onFinish()
- verifyZeroInteractions(githubApiMock)
- }
-}
diff --git a/.ci/pipeline-library/src/test/prChanges.groovy b/.ci/pipeline-library/src/test/prChanges.groovy
deleted file mode 100644
index e3f82e6102ac..000000000000
--- a/.ci/pipeline-library/src/test/prChanges.groovy
+++ /dev/null
@@ -1,113 +0,0 @@
-import org.junit.*
-import static groovy.test.GroovyAssert.*
-
-class PrChangesTest extends KibanaBasePipelineTest {
- def prChanges
-
- @Before
- void setUp() {
- super.setUp()
-
- env.ghprbPullId = '1'
-
- props([
- githubPr: [
- isPr: { true },
- ],
- ])
-
- prChanges = loadScript("vars/prChanges.groovy")
- }
-
- @Test
- void 'areChangesSkippable() with no changes'() {
- props([
- githubPrs: [
- getChanges: { [] },
- ],
- ])
-
- assertTrue(prChanges.areChangesSkippable())
- }
-
- @Test
- void 'areChangesSkippable() with skippable changes'() {
- props([
- githubPrs: [
- getChanges: { [
- [filename: 'docs/test/a-fake-doc.asciidoc'],
- [filename: 'README.md'],
- ] },
- ],
- ])
-
- assertTrue(prChanges.areChangesSkippable())
- }
-
- @Test
- void 'areChangesSkippable() with skippable renames'() {
- props([
- githubPrs: [
- getChanges: { [
- [ filename: 'docs/test/a-fake-doc.asciidoc', previousFilename: 'docs/test/a-different-fake-doc.asciidoc' ],
- [ filename: 'README.md', previousFilename: 'README-old.md' ],
- ] },
- ],
- ])
-
- assertTrue(prChanges.areChangesSkippable())
- }
-
- @Test
- void 'areChangesSkippable() with unskippable changes'() {
- props([
- githubPrs: [
- getChanges: { [
- [filename: 'src/core/index.ts'],
- ] },
- ],
- ])
-
- assertFalse(prChanges.areChangesSkippable())
- }
-
- @Test
- void 'areChangesSkippable() with skippable and unskippable changes'() {
- props([
- githubPrs: [
- getChanges: { [
- [filename: 'README.md'],
- [filename: 'src/core/index.ts'],
- ] },
- ],
- ])
-
- assertFalse(prChanges.areChangesSkippable())
- }
-
- @Test
- void 'areChangesSkippable() with skippable changes that are in notSkippablePaths'() {
- props([
- githubPrs: [
- getChanges: { [
- [filename: 'docs/developer/plugin-list.asciidoc'],
- ] },
- ],
- ])
-
- assertFalse(prChanges.areChangesSkippable())
- }
-
- @Test
- void 'areChangesSkippable() with plugin readme changes'() {
- props([
- githubPrs: [
- getChanges: { [
- [filename: 'src/plugins/foo/README.asciidoc'],
- ] },
- ],
- ])
-
- assertFalse(prChanges.areChangesSkippable())
- }
-}
diff --git a/.ci/pipeline-library/src/test/slackNotifications.groovy b/.ci/pipeline-library/src/test/slackNotifications.groovy
deleted file mode 100644
index 33b3afed80bd..000000000000
--- a/.ci/pipeline-library/src/test/slackNotifications.groovy
+++ /dev/null
@@ -1,185 +0,0 @@
-import org.junit.*
-import static groovy.test.GroovyAssert.*
-
-class SlackNotificationsTest extends KibanaBasePipelineTest {
- def slackNotifications
-
- @Before
- void setUp() {
- super.setUp()
-
- helper.registerAllowedMethod('slackSend', [Map.class], null)
- prop('buildState', loadScript("vars/buildState.groovy"))
- slackNotifications = loadScript('vars/slackNotifications.groovy')
- }
-
- @Test
- void 'getTestFailures() should properly format failure steps'() {
- mockFailureBuild()
-
- def failureMessage = slackNotifications.getTestFailures()
-
- assertEquals(
- "*Test Failures*\n• <${Mocks.TEST_FAILURE_URL}|x-pack/test/functional/apps/fake/test·ts.Fake test <Component> should & pass &>",
- failureMessage
- )
- }
-
- @Test
- void 'sendFailedBuild() should call slackSend() with an in-progress message'() {
- mockFailureBuild()
-
- slackNotifications.sendFailedBuild()
-
- def args = fnMock('slackSend').args[0]
-
- def expected = [
- channel: '#kibana-operations-alerts',
- username: 'Kibana Operations',
- iconEmoji: ':jenkins:',
- color: 'danger',
- message: ':hourglass_flowing_sand: elastic / kibana # master #1',
- ]
-
- expected.each {
- assertEquals(it.value.toString(), args[it.key].toString())
- }
-
- assertEquals(
- ":hourglass_flowing_sand: **",
- args.blocks[0].text.text.toString()
- )
-
- assertEquals(
- "*Failed Steps*\n• ",
- args.blocks[1].text.text.toString()
- )
-
- assertEquals(
- "*Test Failures*\n• ",
- args.blocks[2].text.text.toString()
- )
- }
-
- @Test
- void 'sendFailedBuild() should call slackSend() with message'() {
- mockFailureBuild()
-
- slackNotifications.sendFailedBuild(isFinal: true)
-
- def args = fnMock('slackSend').args[0]
-
- def expected = [
- channel: '#kibana-operations-alerts',
- username: 'Kibana Operations',
- iconEmoji: ':jenkins:',
- color: 'danger',
- message: ':broken_heart: elastic / kibana # master #1',
- ]
-
- expected.each {
- assertEquals(it.value.toString(), args[it.key].toString())
- }
-
- assertEquals(
- ":broken_heart: **",
- args.blocks[0].text.text.toString()
- )
-
- assertEquals(
- "*Failed Steps*\n• ",
- args.blocks[1].text.text.toString()
- )
-
- assertEquals(
- "*Test Failures*\n• ",
- args.blocks[2].text.text.toString()
- )
- }
-
- @Test
- void 'sendFailedBuild() should call slackSend() with a backup message when first attempt fails'() {
- mockFailureBuild()
- def counter = 0
- helper.registerAllowedMethod('slackSend', [Map.class], { ++counter > 1 })
- slackNotifications.sendFailedBuild(isFinal: true)
-
- def args = fnMocks('slackSend')[1].args[0]
-
- def expected = [
- channel: '#kibana-operations-alerts',
- username: 'Kibana Operations',
- iconEmoji: ':jenkins:',
- color: 'danger',
- message: ':broken_heart: elastic / kibana # master #1',
- ]
-
- expected.each {
- assertEquals(it.value.toString(), args[it.key].toString())
- }
-
- assertEquals(
- ":broken_heart: **" +
- "\n\nFirst attempt at sending this notification failed. Please check the build.",
- args.blocks[0].text.text.toString()
- )
- }
-
- @Test
- void 'sendFailedBuild() should call slackSend() with a channel id and timestamp on second call'() {
- mockFailureBuild()
- helper.registerAllowedMethod('slackSend', [Map.class], { [ channelId: 'CHANNEL_ID', ts: 'TIMESTAMP' ] })
- slackNotifications.sendFailedBuild(isFinal: false)
- slackNotifications.sendFailedBuild(isFinal: true)
-
- def args = fnMocks('slackSend')[1].args[0]
-
- def expected = [
- channel: 'CHANNEL_ID',
- timestamp: 'TIMESTAMP',
- username: 'Kibana Operations',
- iconEmoji: ':jenkins:',
- color: 'danger',
- message: ':broken_heart: elastic / kibana # master #1',
- ]
-
- expected.each {
- assertEquals(it.value.toString(), args[it.key].toString())
- }
- }
-
- @Test
- void 'getTestFailures() should truncate list of failures to 10'() {
- prop('testUtils', [
- getFailures: {
- return (1..12).collect {
- return [
- url: Mocks.TEST_FAILURE_URL,
- fullDisplayName: "Failure #${it}",
- ]
- }
- },
- ])
-
- def message = (String) slackNotifications.getTestFailures()
-
- assertTrue("Message ends with truncated indicator", message.endsWith("...and 2 more"))
- assertTrue("Message contains Failure #10", message.contains("Failure #10"))
- assertTrue("Message does not contain Failure #11", !message.contains("Failure #11"))
- }
-
- @Test
- void 'shortenMessage() should truncate a long message, but leave parts that fit'() {
- assertEquals('Hello\nHello\n[...truncated...]', slackNotifications.shortenMessage('Hello\nHello\nthis is a long string', 29))
- }
-
- @Test
- void 'shortenMessage() should not modify a short message'() {
- assertEquals('Hello world', slackNotifications.shortenMessage('Hello world', 11))
- }
-
- @Test
- void 'shortenMessage() should truncate an entire message with only one part'() {
- assertEquals('[...truncated...]', slackNotifications.shortenMessage('Hello world this is a really long message', 40))
- }
-}
diff --git a/.ci/pipeline-library/vars b/.ci/pipeline-library/vars
deleted file mode 120000
index 8559d2e08fc2..000000000000
--- a/.ci/pipeline-library/vars
+++ /dev/null
@@ -1 +0,0 @@
-../../vars
\ No newline at end of file
diff --git a/.ci/runbld_no_junit.yml b/.ci/runbld_no_junit.yml
deleted file mode 100644
index 1bcb7e22a264..000000000000
--- a/.ci/runbld_no_junit.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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: false
diff --git a/Dockerfile b/Dockerfile
index 534b98ef7de4..c8ea4fd52371 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,20 +14,10 @@ RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y rsync jq bsdtar google-chrome-stable \
- --no-install-recommends \
+ --no-install-recommends python-pip \
+ && pip install awscli \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-RUN LATEST_VAULT_RELEASE=$(curl -s https://api.github.com/repos/hashicorp/vault/tags | jq --raw-output .[0].name[1:]) \
- && curl -L https://releases.hashicorp.com/vault/${LATEST_VAULT_RELEASE}/vault_${LATEST_VAULT_RELEASE}_linux_amd64.zip -o vault.zip \
- && unzip vault.zip \
- && rm vault.zip \
- && chmod +x vault \
- && mv vault /usr/local/bin/vault
-
-RUN apt-get update && apt-get install -y \
- python-pip
-RUN pip install awscli
-
RUN groupadd -r kibana && useradd -r -g kibana kibana && mkdir /home/kibana && chown kibana:kibana /home/kibana
USER kibana
diff --git a/Jenkinsfile b/Jenkinsfile
index 88524ae09589..954590cddff1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -15,7 +15,7 @@ pipeline {
steps {
script {
IMAGE_NAME = "website-src-image:${env.BUILD_ID}"
- DOCKER_IMAGE = docker.build IMAGE_NAME
+ DOCKER_IMAGE = docker.build(IMAGE_NAME)
DOCKER_IMAGE.inside {
stage('bootstrap') {
echo "Bootstrap here"
diff --git a/test/scripts/jenkins_xpack.sh b/test/scripts/jenkins_xpack.sh
deleted file mode 100755
index c4e2774bb646..000000000000
--- a/test/scripts/jenkins_xpack.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-source test/scripts/jenkins_test_setup.sh
-
-echo " -> Running jest tests"
-cd "$XPACK_DIR"
-checks-reporter-with-killswitch "X-Pack Jest" node --max-old-space-size=6144 scripts/jest --ci --verbose
-echo ""
-echo ""
-
-echo " -> Running Security Solution cyclic dependency test"
-cd "$XPACK_DIR"
-checks-reporter-with-killswitch "X-Pack Security Solution cyclic dependency test" node plugins/security_solution/scripts/check_circular_deps
-echo ""
-echo ""
-
-echo " -> Running List cyclic dependency test"
-cd "$XPACK_DIR"
-checks-reporter-with-killswitch "X-Pack List cyclic dependency test" node plugins/lists/scripts/check_circular_deps
-echo ""
-echo ""
-
-# echo " -> Running jest integration tests"
-# cd "$XPACK_DIR"
-# node scripts/jest_integration --ci --verbose
-# echo ""
-# echo ""
diff --git a/test/scripts/jenkins_xpack_accessibility.sh b/test/scripts/jenkins_xpack_accessibility.sh
deleted file mode 100755
index 3afd4bfb7639..000000000000
--- a/test/scripts/jenkins_xpack_accessibility.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-source test/scripts/jenkins_test_setup_xpack.sh
-
-checks-reporter-with-killswitch "X-Pack accessibility tests" \
- node scripts/functional_tests \
- --debug --bail \
- --kibana-install-dir "$KIBANA_INSTALL_DIR" \
- --config test/accessibility/config.ts;
diff --git a/test/scripts/jenkins_xpack_baseline.sh b/test/scripts/jenkins_xpack_baseline.sh
deleted file mode 100755
index 7577b6927d16..000000000000
--- a/test/scripts/jenkins_xpack_baseline.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-source src/dev/ci_setup/setup_env.sh
-source "$KIBANA_DIR/src/dev/ci_setup/setup_percy.sh"
-
-echo " -> building and extracting default Kibana distributable"
-cd "$KIBANA_DIR"
-node scripts/build --debug --no-oss
-linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
-installDir="$KIBANA_DIR/install/kibana"
-mkdir -p "$installDir"
-tar -xzf "$linuxBuild" -C "$installDir" --strip=1
-
-mkdir -p "$WORKSPACE/kibana-build-xpack"
-cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
-
-cd "$KIBANA_DIR"
-source "test/scripts/jenkins_xpack_saved_objects_field_metrics.sh"
diff --git a/test/scripts/jenkins_xpack_build_kibana.sh b/test/scripts/jenkins_xpack_build_kibana.sh
deleted file mode 100755
index 912130d973eb..000000000000
--- a/test/scripts/jenkins_xpack_build_kibana.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-
-cd "$KIBANA_DIR"
-source src/dev/ci_setup/setup_env.sh
-
-if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then
- ./test/scripts/jenkins_xpack_build_plugins.sh
-fi
-
-# doesn't persist, also set in kibanaPipeline.groovy
-export KBN_NP_PLUGINS_BUILT=true
-
-echo " -> Ensuring all functional tests are in a ciGroup"
-cd "$XPACK_DIR"
-node scripts/functional_tests --assert-none-excluded \
- --include-tag ciGroup1 \
- --include-tag ciGroup2 \
- --include-tag ciGroup3 \
- --include-tag ciGroup4 \
- --include-tag ciGroup5 \
- --include-tag ciGroup6 \
- --include-tag ciGroup7 \
- --include-tag ciGroup8 \
- --include-tag ciGroup9 \
- --include-tag ciGroup10
-
-echo " -> building and extracting default Kibana distributable for use in functional tests"
-cd "$KIBANA_DIR"
-node scripts/build --debug --no-oss
-linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
-installDir="$KIBANA_DIR/install/kibana"
-mkdir -p "$installDir"
-tar -xzf "$linuxBuild" -C "$installDir" --strip=1
-
-mkdir -p "$WORKSPACE/kibana-build-xpack"
-cp -pR install/kibana/. $WORKSPACE/kibana-build-xpack/
diff --git a/test/scripts/jenkins_xpack_build_plugins.sh b/test/scripts/jenkins_xpack_build_plugins.sh
deleted file mode 100755
index 289e64f66c89..000000000000
--- a/test/scripts/jenkins_xpack_build_plugins.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-source src/dev/ci_setup/setup_env.sh
-
-echo " -> building kibana platform plugins"
-node scripts/build_kibana_platform_plugins \
- --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \
- --scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \
- --scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \
- --scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \
- --scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \
- --scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \
- --scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \
- --workers 12 \
- --verbose
diff --git a/test/scripts/jenkins_xpack_ci_group.sh b/test/scripts/jenkins_xpack_ci_group.sh
deleted file mode 100755
index 6b37d22cd213..000000000000
--- a/test/scripts/jenkins_xpack_ci_group.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-source test/scripts/jenkins_test_setup_xpack.sh
-
-echo " -> Running functional and api tests"
-cd "$XPACK_DIR"
-
-checks-reporter-with-killswitch "X-Pack Chrome Functional tests / Group ${CI_GROUP}" \
- node scripts/functional_tests \
- --debug --bail \
- --kibana-install-dir "$KIBANA_INSTALL_DIR" \
- --include-tag "ciGroup$CI_GROUP"
diff --git a/test/scripts/jenkins_xpack_firefox_smoke.sh b/test/scripts/jenkins_xpack_firefox_smoke.sh
deleted file mode 100755
index ae924a5e1055..000000000000
--- a/test/scripts/jenkins_xpack_firefox_smoke.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-source test/scripts/jenkins_test_setup_xpack.sh
-
-checks-reporter-with-killswitch "X-Pack firefox smoke test" \
- node scripts/functional_tests \
- --debug --bail \
- --kibana-install-dir "$KIBANA_INSTALL_DIR" \
- --include-tag "includeFirefox" \
- --config test/functional/config.firefox.js \
- --config test/functional_embedded/config.firefox.ts;
diff --git a/test/scripts/jenkins_xpack_saved_objects_field_metrics.sh b/test/scripts/jenkins_xpack_saved_objects_field_metrics.sh
deleted file mode 100755
index e3b0fe778bdf..000000000000
--- a/test/scripts/jenkins_xpack_saved_objects_field_metrics.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-source test/scripts/jenkins_test_setup_xpack.sh
-
-checks-reporter-with-killswitch "Capture Kibana Saved Objects field count metrics" \
- node scripts/functional_tests \
- --debug --bail \
- --kibana-install-dir "$KIBANA_INSTALL_DIR" \
- --config test/saved_objects_field_count/config.ts;