mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
# Backport This will backport the following commits from `main` to `9.0`: - [Upgrade Node.js to 20.19.2 (#221177)](https://github.com/elastic/kibana/pull/221177) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Jon","email":"jon@elastic.co"},"sourceCommit":{"committedDate":"2025-06-09T17:17:42Z","message":"Upgrade Node.js to 20.19.2 (#221177)\n\nhttps://github.com/nodejs/node/releases/tag/v20.19.2\n\n---------\n\nCo-authored-by: Tiago Costa <tiago.costa@elastic.co>","sha":"96f48648a90333792f8da150667025423d7ff1b1","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.1.0"],"title":"Upgrade Node.js to 20.19.2","number":221177,"url":"https://github.com/elastic/kibana/pull/221177","mergeCommit":{"message":"Upgrade Node.js to 20.19.2 (#221177)\n\nhttps://github.com/nodejs/node/releases/tag/v20.19.2\n\n---------\n\nCo-authored-by: Tiago Costa <tiago.costa@elastic.co>","sha":"96f48648a90333792f8da150667025423d7ff1b1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221177","number":221177,"mergeCommit":{"message":"Upgrade Node.js to 20.19.2 (#221177)\n\nhttps://github.com/nodejs/node/releases/tag/v20.19.2\n\n---------\n\nCo-authored-by: Tiago Costa <tiago.costa@elastic.co>","sha":"96f48648a90333792f8da150667025423d7ff1b1"}}]}] BACKPORT--> Co-authored-by: Jon <jon@elastic.co> Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
65 lines
3 KiB
Text
65 lines
3 KiB
Text
# Define the workspace base name and a managed directory by bazel
|
|
# that will hold the node_modules called @npm
|
|
workspace(
|
|
name = "kibana",
|
|
managed_directories = {"@npm": ["node_modules"]},
|
|
)
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
# Fetch Node.js rules
|
|
http_archive(
|
|
name = "build_bazel_rules_nodejs",
|
|
patch_args = ["-p1"],
|
|
patches = ["//:src/dev/bazel/rules_nodejs_patches/normalized_paths_for_windows_runfiles.patch"],
|
|
sha256 = "6f15d75f9e99c19d9291ff8e64e4eb594a6b7d25517760a75ad3621a7a48c2df",
|
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.7.0/rules_nodejs-4.7.0.tar.gz"],
|
|
)
|
|
|
|
# Now that we have the rules let's import from them to complete the work
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
|
|
|
|
# Setup the Node.js toolchain for the architectures we want to support
|
|
node_repositories(
|
|
node_repositories = {
|
|
"20.19.2-darwin_amd64": ("node-v20.19.2-darwin-x64.tar.gz", "node-v20.19.2-darwin-x64", "29f91e05992a7d81498ab1d04938a184313cb4aaccab95bb4636e30e6424eae3"),
|
|
"20.19.2-darwin_arm64": ("node-v20.19.2-darwin-arm64.tar.gz", "node-v20.19.2-darwin-arm64", "5f96c725cd2be1151f08b25c05bf5a21866a2dc7db3803d351a6ea19fcc53665"),
|
|
"20.19.2-linux_arm64": ("node-v20.19.2-linux-arm64.tar.xz", "node-v20.19.2-linux-arm64", "7886dc7e151d2dda49b0837bb93dca233a9d3b7f5005ebbcbff9bd1a5ba4981c"),
|
|
"20.19.2-linux_amd64": ("node-v20.19.2-linux-x64.tar.xz", "node-v20.19.2-linux-x64", "3a3b6ccb3d687b60cc8a142e179d7a9cc6a04c7374ba0f782363a26176d6ea74"),
|
|
"20.19.2-windows_amd64": ("node-v20.19.2-win-x64.zip", "node-v20.19.2-win-x64", "8735c9940b97548f6d9d4dda7cf5fd4471c062f15f44c2b890c9b0b430460feb"),
|
|
},
|
|
node_version = "20.19.2",
|
|
node_urls = [
|
|
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}",
|
|
],
|
|
yarn_repositories = {
|
|
"1.22.21": ("yarn-v1.22.21.tar.gz", "yarn-v1.22.21", "a55bb4e85405f5dfd6e7154a444e7e33ad305d7ca858bad8546e932a6688df08"),
|
|
},
|
|
yarn_version = "1.22.21",
|
|
yarn_urls = [
|
|
"https://github.com/yarnpkg/yarn/releases/download/v{version}/{filename}",
|
|
],
|
|
)
|
|
|
|
# Run yarn_install rule to take care of dependencies
|
|
#
|
|
# NOTE: FORCE_COLOR env var forces colors on non tty mode
|
|
yarn_install(
|
|
name = "npm",
|
|
package_json = "//:package.json",
|
|
yarn_lock = "//:yarn.lock",
|
|
data = [
|
|
"//:.yarnrc",
|
|
"//:preinstall_check.js",
|
|
],
|
|
exports_directories_only = True,
|
|
symlink_node_modules = True,
|
|
quiet = False,
|
|
frozen_lockfile = False,
|
|
environment = {
|
|
"GECKODRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
|
|
"CHROMEDRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
|
|
"CHROMEDRIVER_CDNBINARIESURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
|
|
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
|
|
}
|
|
)
|