forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:elastic/kibana into security-assist…
…ant-playground
- Loading branch information
Showing
3,938 changed files
with
112,361 additions
and
67,588 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
14 changes: 14 additions & 0 deletions
14
.buildkite/pipelines/pull_request/observability_onboarding_cypress.yml
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 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/functional/observability_onboarding_cypress.sh | ||
label: 'Observability onboarding Cypress Tests' | ||
agents: | ||
queue: n2-4-spot | ||
depends_on: build | ||
timeout_in_minutes: 120 | ||
parallelism: 2 | ||
retry: | ||
automatic: | ||
- exit_status: '-1' | ||
limit: 3 | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { execSync } from 'child_process'; | ||
|
||
const parseTarget = process.argv[2] ?? 'BUILDKITE_MESSAGE'; | ||
const alsoAnnotate = process.argv[3] ?? false; | ||
|
||
const prNumWithinMsgRe = /\(\#(\d+)\)/; | ||
// @ts-expect-error | ||
const firstMatch = (x: string) => x[0].match(prNumWithinMsgRe)[1]; | ||
const head = (x: string): string[] => x.split('\n'); | ||
const parseInt10 = (x: string) => parseInt(x, 10); | ||
export type PrNumber = string | number; | ||
const fetchLabels = (prNumber: PrNumber) => | ||
execSync(`gh pr view '${prNumber}' --json labels | jq '.labels[].name'`) | ||
.toString() | ||
.trim() | ||
.split('\n') | ||
.map((x: string) => x.replaceAll('"', '')) | ||
.join(' '); | ||
|
||
try { | ||
const labels = pipe(head, firstMatch, parseInt10, fetchLabels)(`${process.env[parseTarget]}`); | ||
execSync(`buildkite-agent meta-data set gh_labels ${labels}`); | ||
if (alsoAnnotate) | ||
execSync( | ||
`buildkite-agent annotate --context 'default' --style 'info' "Github Labels: ${labels}"` | ||
); | ||
} catch (e) { | ||
console.error( | ||
`\n!!! Error fetching Github Labels (stringified): \n${JSON.stringify(e, null, 2)}` | ||
); | ||
} | ||
|
||
export {}; | ||
|
||
function pipe(...fns: any[]) { | ||
return fns.reduce( | ||
(f, g) => | ||
(...args: any[]) => | ||
g(f(...args)) | ||
); | ||
} |
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
17 changes: 17 additions & 0 deletions
17
.buildkite/scripts/steps/functional/observability_onboarding_cypress.sh
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/common/util.sh | ||
|
||
.buildkite/scripts/bootstrap.sh | ||
.buildkite/scripts/download_build_artifacts.sh | ||
|
||
export JOB=kibana-observability-onboarding-cypress | ||
|
||
echo "--- Observability onboarding Cypress Tests" | ||
|
||
cd "$XPACK_DIR" | ||
|
||
node plugins/observability_onboarding/scripts/test/e2e.js \ | ||
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \ |
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.