Skip to content

Commit b0418ff

Browse files
committed
Merge remote-tracking branch 'upstream/alerting_v2' into rule-http-apis
2 parents 2d2cf00 + 2c72b84 commit b0418ff

2,917 files changed

Lines changed: 138030 additions & 100389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
legacy-peer-deps=true
1+
legacy-peer-deps=true
2+
ignore-scripts=true

.buildkite/package-lock.json

Lines changed: 23 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.buildkite/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
"nock": "^12.0.2",
3131
"ts-jest": "^29.4.0",
3232
"ts-node": "^10.9.2",
33-
"typescript": "^5.1.6"
33+
"typescript": "^5.1.6",
34+
"yarn": "^1.22.22"
3435
},
3536
"imports": {
3637
"#pipeline-utils": "./pipeline-utils/index.ts",
3738
"#pipeline-utils/*": "./pipeline-utils/*"
3839
}
39-
}
40+
}

.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,22 @@ steps:
8282
- exit_status: '*'
8383
limit: 1
8484

85+
- command: .buildkite/scripts/steps/test/scout_uiam_tests.sh
86+
label: 'Scout UIAM Tests'
87+
agents:
88+
image: family/kibana-ubuntu-2404
89+
imageProject: elastic-images-prod
90+
provider: gcp
91+
machineType: n2-standard-4
92+
diskSizeGb: 115
93+
timeout_in_minutes: 15
94+
depends_on:
95+
- build
96+
retry:
97+
automatic:
98+
- exit_status: '*'
99+
limit: 1
100+
85101
- command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh
86102
label: 'Serverless Entity Analytics - Security Solution Cypress Tests'
87103
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"

.buildkite/pipelines/on_merge.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,22 @@ steps:
210210
- exit_status: '*'
211211
limit: 1
212212

213+
- command: .buildkite/scripts/steps/test/scout_uiam_tests.sh
214+
label: 'Scout UIAM Tests'
215+
agents:
216+
image: family/kibana-ubuntu-2404
217+
imageProject: elastic-images-prod
218+
provider: gcp
219+
machineType: n2-standard-4
220+
diskSizeGb: 105
221+
timeout_in_minutes: 15
222+
depends_on:
223+
- build
224+
retry:
225+
automatic:
226+
- exit_status: '*'
227+
limit: 1
228+
213229
- command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh
214230
label: 'Serverless Entity Analytics - Security Cypress Tests'
215231
agents:

.buildkite/pipelines/pull_request/base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
agents:
2525
machineType: n2-standard-8
2626
preemptible: true
27-
diskSizeGb: 150
27+
diskSizeGb: 200
2828
key: build
2929
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
3030
timeout_in_minutes: 90
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/test/scout_uiam_tests.sh
3+
label: 'Scout UIAM Tests'
4+
agents:
5+
machineType: n2-standard-4
6+
timeout_in_minutes: 15
7+
depends_on:
8+
- build
9+
- quick_checks
10+
- checks
11+
- linting
12+
- linting_with_types
13+
- check_types
14+
- check_oas_snapshot
15+
retry:
16+
automatic:
17+
- exit_status: '*'
18+
limit: 1

.buildkite/scripts/common/setup_buildkite_deps.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ if [[ "$(type -t retry)" != "function" ]]; then
88
source "$(dirname "${BASH_SOURCE[0]}")/util.sh"
99
fi
1010

11-
# `rm -rf <ts-node node_modules dir>; npm install -g ts-node` will cause ts-node bin files to be messed up
12-
# but literally just calling `npm install -g ts-node` a second time fixes it
13-
# this is only on newer versions of npm
14-
npm_install_global ts-node
15-
if ! ts-node --version; then
16-
npm_install_global ts-node
17-
ts-node --version;
18-
fi
19-
2011
cd '.buildkite'
2112
retry 5 15 npm ci --no-audit
13+
BIN_DIR="$(npm root)/.bin"
2214
cd -
15+
16+
mkdir -p "$HOME/.kibana-buildkite/bin"
17+
ln -sf "$BIN_DIR/yarn" "$HOME/.kibana-buildkite/bin/yarn"
18+
ln -sf "$BIN_DIR/ts-node" "$HOME/.kibana-buildkite/bin/ts-node"
19+
20+
export PATH="$HOME/.kibana-buildkite/bin:$PATH"
21+
22+
echo "yarn: $(yarn --version)"
23+
echo "ts-node: $(ts-node --version)"

.buildkite/scripts/common/setup_node.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,3 @@ else
6969
fi
7070

7171
export PATH="$NODE_BIN_DIR:$PATH"
72-
73-
echo "--- Setup Yarn"
74-
75-
YARN_VERSION=$(node -e "console.log(String(require('./package.json').engines.yarn || '').replace(/^[^\d]+/,''))")
76-
export YARN_VERSION
77-
78-
if [[ ! $(which yarn) || $(yarn --version) != "$YARN_VERSION" ]]; then
79-
npm_install_global yarn "^$YARN_VERSION"
80-
fi
81-
82-
YARN_GLOBAL_BIN=$(yarn global bin)
83-
export YARN_GLOBAL_BIN
84-
export PATH="$PATH:$YARN_GLOBAL_BIN"

.buildkite/scripts/common/util.sh

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -132,33 +132,6 @@ set_git_merge_base() {
132132
export GITHUB_PR_MERGE_BASE
133133
}
134134

135-
# If npm install is terminated early, e.g. because the build was cancelled in buildkite,
136-
# a package directory is left behind in a bad state that can cause all subsequent installs to fail
137-
# So this function contains some cleanup/retry logic to try to recover from this kind of situation
138-
npm_install_global() {
139-
package="$1"
140-
version="${2:-latest}"
141-
toInstall="$package@$version"
142-
143-
npmRoot=$(npm root -g)
144-
packageRoot="${npmRoot:?}/$package"
145-
146-
# The success flag file exists just to try to make sure we know that the full install was done
147-
# For example, if a job terminates in the middle of npm install, a directory could be left behind that we don't know the state of
148-
successFlag="${packageRoot:?}/.install-success"
149-
150-
if [[ -d "$packageRoot" && ! -f "$successFlag" ]]; then
151-
echo "Removing existing package directory $packageRoot before install, seems previous installation was not successful"
152-
rm -rf "$packageRoot"
153-
fi
154-
155-
if [[ ! $(npm install -g "$toInstall" && touch "$successFlag") ]]; then
156-
rm -rf "$packageRoot"
157-
echo "Trying again to install $toInstall..."
158-
npm install -g "$toInstall" && touch "$successFlag"
159-
fi
160-
}
161-
162135
# Download an artifact using the buildkite-agent, takes the same arguments as https://buildkite.com/docs/agent/v3/cli-artifact#downloading-artifacts-usage
163136
# times-out after 60 seconds and retries up to 3 times
164137
download_artifact() {

0 commit comments

Comments
 (0)