kibana/WORKSPACE.bazel
Kibana Machine 58f9c08661
[8.13] Upgrade Node.js to v20.12.2 (#180522) (#180601)
# Backport

This will backport the following commits from `main` to `8.13`:
- [Upgrade Node.js to v20.12.2
(#180522)](https://github.com/elastic/kibana/pull/180522)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Jon","email":"jon@elastic.co"},"sourceCommit":{"committedDate":"2024-04-11T13:56:38Z","message":"Upgrade
Node.js to v20.12.2 (#180522)\n\nDraft
pending\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/138","sha":"af0ab74d049f87ab6e174e3bc819b661f0b01d21","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v8.14.0"],"title":"Upgrade
Node.js to
v20.12.2","number":180522,"url":"https://github.com/elastic/kibana/pull/180522","mergeCommit":{"message":"Upgrade
Node.js to v20.12.2 (#180522)\n\nDraft
pending\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/138","sha":"af0ab74d049f87ab6e174e3bc819b661f0b01d21"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/180522","number":180522,"mergeCommit":{"message":"Upgrade
Node.js to v20.12.2 (#180522)\n\nDraft
pending\r\nhttps://buildkite.com/elastic/kibana-custom-node-dot-js-builds/builds/138","sha":"af0ab74d049f87ab6e174e3bc819b661f0b01d21"}}]}]
BACKPORT-->

Co-authored-by: Jon <jon@elastic.co>
2024-04-11 08:11:34 -07:00

66 lines
3.1 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.12.2-darwin_amd64": ("node-v20.12.2-darwin-x64.tar.gz", "node-v20.12.2-darwin-x64", "cd5e9a80a38ccffc036a87b232a5402339c7bf8fa9a494ae0731a1a671687718"),
"20.12.2-darwin_arm64": ("node-v20.12.2-darwin-arm64.tar.gz", "node-v20.12.2-darwin-arm64", "98eb624b52efec2530079e1d11296ec0ac20771b94b087d21649250339cf5332"),
"20.12.2-linux_arm64": ("node-v20.12.2-linux-arm64.tar.xz", "node-v20.12.2-linux-arm64", "26f6dfac78a119e088458c1e6f2beb6c546a170d916060a23c92075718f92966"),
"20.12.2-linux_amd64": ("node-v20.12.2-linux-x64.tar.xz", "node-v20.12.2-linux-x64", "37756bc241b099e7435e20ba088dd9c13f39c6dc4235661c807cdd7b361371ef"),
"20.12.2-windows_amd64": ("node-v20.12.2-win-x64.zip", "node-v20.12.2-win-x64", "66dda1717cae30a13be6bb17ad96ee54b69f2c23c85acd9c3299b095fa26b452"),
},
node_version = "20.12.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",
"RE2_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2",
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
}
)