-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 fix/timelion-arguments
- Loading branch information
Showing
1,908 changed files
with
51,609 additions
and
30,612 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!/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}" | ||
APM_ITS = 'apm-integration-testing' | ||
CYPRESS_DIR = 'x-pack/legacy/plugins/apm/cypress' | ||
PIPELINE_LOG_LEVEL = 'DEBUG' | ||
} | ||
options { | ||
timeout(time: 1, unit: 'HOURS') | ||
buildDiscarder(logRotator(numToKeepStr: '40', artifactNumToKeepStr: '20', daysToKeepStr: '30')) | ||
timestamps() | ||
ansiColor('xterm') | ||
disableResume() | ||
durabilityHint('PERFORMANCE_OPTIMIZED') | ||
} | ||
triggers { | ||
issueCommentTrigger('(?i).*jenkins\\W+run\\W+(?:the\\W+)?e2e(?:\\W+please)?.*') | ||
} | ||
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") | ||
script { | ||
dir("${BASE_DIR}"){ | ||
def regexps =[ "^x-pack/legacy/plugins/apm/.*" ] | ||
env.APM_UPDATED = isGitRegionMatch(patterns: regexps) | ||
} | ||
} | ||
dir("${APM_ITS}"){ | ||
git changelog: false, | ||
credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba', | ||
poll: false, | ||
url: "git@github.com:elastic/${APM_ITS}.git" | ||
} | ||
} | ||
} | ||
stage('Start services') { | ||
options { skipDefaultCheckout() } | ||
when { | ||
anyOf { | ||
expression { return params.FORCE } | ||
expression { return env.APM_UPDATED != "false" } | ||
} | ||
} | ||
steps { | ||
dir("${APM_ITS}"){ | ||
sh './scripts/compose.py start master --no-kibana --no-xpack-secure' | ||
} | ||
} | ||
} | ||
stage('Prepare Kibana') { | ||
options { skipDefaultCheckout() } | ||
when { | ||
anyOf { | ||
expression { return params.FORCE } | ||
expression { return env.APM_UPDATED != "false" } | ||
} | ||
} | ||
environment { | ||
JENKINS_NODE_COOKIE = 'dontKillMe' | ||
} | ||
steps { | ||
dir("${BASE_DIR}"){ | ||
sh script: "${CYPRESS_DIR}/ci/prepare-kibana.sh" | ||
} | ||
} | ||
} | ||
stage('Smoke Tests'){ | ||
options { skipDefaultCheckout() } | ||
when { | ||
anyOf { | ||
expression { return params.FORCE } | ||
expression { return env.APM_UPDATED != "false" } | ||
} | ||
} | ||
steps{ | ||
dir("${BASE_DIR}"){ | ||
sh ''' | ||
jobs -l | ||
docker build --tag cypress ${CYPRESS_DIR}/ci | ||
docker run --rm -t --user "$(id -u):$(id -g)" \ | ||
-v `pwd`:/app --network="host" \ | ||
--name cypress cypress''' | ||
} | ||
} | ||
post { | ||
always { | ||
dir("${BASE_DIR}"){ | ||
archiveArtifacts(allowEmptyArchive: false, artifacts: "${CYPRESS_DIR}/screenshots/**,${CYPRESS_DIR}/videos/**,${CYPRESS_DIR}/*e2e-tests.xml") | ||
junit(allowEmptyResults: true, testResults: "${CYPRESS_DIR}/*e2e-tests.xml") | ||
} | ||
dir("${APM_ITS}"){ | ||
sh 'docker-compose logs > apm-its.log || true' | ||
sh 'docker-compose down -v || true' | ||
archiveArtifacts(allowEmptyArchive: false, artifacts: 'apm-its.log') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
dir("${BASE_DIR}"){ | ||
archiveArtifacts(allowEmptyArchive: true, artifacts: "${CYPRESS_DIR}/ingest-data.log,kibana.log") | ||
} | ||
} | ||
} | ||
} |
Validating CODEOWNERS rules …
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
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,81 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you 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 | ||
* | ||
* http://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. | ||
*/ | ||
|
||
/** | ||
* DO NOT EDIT THIS FILE! | ||
* | ||
* This file contains the configuration for the Elastic APM instrumentaion of | ||
* Kibana itself and is only intented to be used during development of Kibana. | ||
* | ||
* Instrumentation is turned off by default. Once activated it will send APM | ||
* data to an Elasticsearch cluster accessible by Elastic employees. | ||
* | ||
* To modify the configuration, either use environment variables, or create a | ||
* file named `config/apm.dev.js`, which exports a config object as described | ||
* in the docs. | ||
* | ||
* For an overview over the available configuration files, see: | ||
* https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html | ||
* | ||
* For general information about Elastic APM, see: | ||
* https://www.elastic.co/guide/en/apm/get-started/current/index.html | ||
*/ | ||
|
||
const { readFileSync } = require('fs'); | ||
const { join } = require('path'); | ||
const { execSync } = require('child_process'); | ||
const merge = require('lodash.merge'); | ||
|
||
module.exports = merge({ | ||
active: false, | ||
serverUrl: 'https://f1542b814f674090afd914960583265f.apm.us-central1.gcp.cloud.es.io:443', | ||
// The secretToken below is intended to be hardcoded in this file even though | ||
// it makes it public. This is not a security/privacy issue. Normally we'd | ||
// instead disable the need for a secretToken in the APM Server config where | ||
// the data is transmitted to, but due to how it's being hosted, it's easier, | ||
// for now, to simply leave it in. | ||
secretToken: 'R0Gjg46pE9K9wGestd', | ||
globalLabels: {}, | ||
centralConfig: false, | ||
logUncaughtExceptions: true | ||
}, devConfig()); | ||
|
||
const rev = gitRev(); | ||
if (rev !== null) module.exports.globalLabels.git_rev = rev; | ||
|
||
try { | ||
const filename = join(__dirname, '..', 'data', 'uuid'); | ||
module.exports.globalLabels.kibana_uuid = readFileSync(filename, 'utf-8'); | ||
} catch (e) {} // eslint-disable-line no-empty | ||
|
||
function gitRev() { | ||
try { | ||
return execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim(); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
|
||
function devConfig() { | ||
try { | ||
return require('./apm.dev'); // eslint-disable-line import/no-unresolved | ||
} catch (e) { | ||
return {}; | ||
} | ||
} |
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
Oops, something went wrong.