2019-05-22 20:28:42 -04:00
|
|
|
workspace(
|
|
|
|
name = "angular",
|
|
|
|
managed_directories = {"@npm": ["node_modules"]},
|
|
|
|
)
|
2017-09-25 15:40:22 -04:00
|
|
|
|
2018-12-05 15:16:14 -05:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2018-12-01 19:08:15 -05:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Fetch rules_nodejs so we can install our npm dependencies
|
|
|
|
http_archive(
|
|
|
|
name = "build_bazel_rules_nodejs",
|
2021-01-11 15:24:51 -05:00
|
|
|
sha256 = "4952ef879704ab4ad6729a29007e7094aef213ea79e9f2e94cbe1c9a753e63ef",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.0/rules_nodejs-2.2.0.tar.gz"],
|
2018-06-25 14:22:23 -04:00
|
|
|
)
|
|
|
|
|
2020-02-04 19:14:21 -05:00
|
|
|
# Check the rules_nodejs version and download npm dependencies
|
|
|
|
# Note: bazel (version 2 and after) will check the .bazelversion file so we don't need to
|
|
|
|
# assert on that.
|
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2020-06-25 04:32:41 -04:00
|
|
|
check_rules_nodejs_version(minimum_version_string = "2.2.0")
|
2019-02-20 12:54:42 -05:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Setup the Node.js toolchain
|
2018-05-11 02:35:21 -04:00
|
|
|
node_repositories(
|
2020-01-24 12:59:15 -05:00
|
|
|
node_version = "12.14.1",
|
2018-09-11 21:11:32 -04:00
|
|
|
package_json = ["//:package.json"],
|
2018-05-11 02:35:21 -04:00
|
|
|
)
|
2018-05-10 16:12:30 -04:00
|
|
|
|
2020-02-04 14:45:40 -05:00
|
|
|
load("//integration:angular_integration_test.bzl", "npm_package_archives")
|
|
|
|
|
2019-02-20 12:54:42 -05:00
|
|
|
yarn_install(
|
|
|
|
name = "npm",
|
2020-02-04 14:45:40 -05:00
|
|
|
manual_build_file_contents = npm_package_archives(),
|
2019-02-20 12:54:42 -05:00
|
|
|
package_json = "//:package.json",
|
2019-06-07 16:38:06 -04:00
|
|
|
yarn_lock = "//:yarn.lock",
|
2019-02-20 12:54:42 -05:00
|
|
|
)
|
2019-02-04 18:53:32 -05:00
|
|
|
|
|
|
|
# Load angular dependencies
|
|
|
|
load("//packages/bazel:package.bzl", "rules_angular_dev_dependencies")
|
|
|
|
|
|
|
|
rules_angular_dev_dependencies()
|
|
|
|
|
2019-07-24 11:52:26 -04:00
|
|
|
# Load protractor dependencies
|
2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
|
2019-07-24 11:52:26 -04:00
|
|
|
|
|
|
|
npm_bazel_protractor_dependencies()
|
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Load karma dependencies
|
2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies")
|
2019-02-04 18:53:32 -05:00
|
|
|
|
2019-09-27 18:49:59 -04:00
|
|
|
npm_bazel_karma_dependencies()
|
2019-02-04 18:53:32 -05:00
|
|
|
|
|
|
|
# Setup the rules_webtesting toolchain
|
2019-02-13 12:33:48 -05:00
|
|
|
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
|
2018-05-10 16:12:30 -04:00
|
|
|
|
|
|
|
web_test_repositories()
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2020-05-08 15:56:39 -04:00
|
|
|
load("//dev-infra/browsers:browser_repositories.bzl", "browser_repositories")
|
2019-02-13 12:33:48 -05:00
|
|
|
|
2019-11-01 14:17:10 -04:00
|
|
|
browser_repositories()
|
2018-05-10 16:12:30 -04:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Setup the rules_sass toolchain
|
2018-04-25 12:23:20 -04:00
|
|
|
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-04-25 12:23:20 -04:00
|
|
|
sass_repositories()
|
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Setup the skydoc toolchain
|
2018-04-25 12:23:20 -04:00
|
|
|
load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories")
|
2018-09-24 16:58:23 -04:00
|
|
|
|
2018-04-25 12:23:20 -04:00
|
|
|
skydoc_repositories()
|
2019-03-15 13:45:20 -04:00
|
|
|
|
|
|
|
load("@bazel_toolchains//rules:environments.bzl", "clang_env")
|
|
|
|
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
|
|
|
|
|
|
|
|
rbe_autoconfig(
|
|
|
|
name = "rbe_ubuntu1604_angular",
|
2019-06-25 04:07:01 -04:00
|
|
|
# Need to specify a base container digest in order to ensure that we can use the checked-in
|
|
|
|
# platform configurations for the "ubuntu16_04" image. Otherwise the autoconfig rule would
|
|
|
|
# need to pull the image and run it in order determine the toolchain configuration. See:
|
2021-01-26 11:57:44 -05:00
|
|
|
# https://github.com/bazelbuild/bazel-toolchains/blob/4.0.0/configs/ubuntu16_04_clang/versions.bzl
|
2020-10-05 18:42:11 -04:00
|
|
|
base_container_digest = "sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1",
|
2019-03-15 13:45:20 -04:00
|
|
|
# Note that if you change the `digest`, you might also need to update the
|
|
|
|
# `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest:<digest>
|
|
|
|
# and marketplace.gcr.io/google/rbe-ubuntu16-04:<base_container_digest> have
|
2019-06-25 04:07:01 -04:00
|
|
|
# the same Clang and JDK installed. Clang is needed because of the dependency on
|
|
|
|
# @com_google_protobuf. Java is needed for the Bazel's test executor Java tool.
|
2020-10-20 17:47:13 -04:00
|
|
|
digest = "sha256:dddaaddbe07a61c2517f9b08c4977fc23c4968fcb6c0b8b5971e955d2de7a961",
|
2019-03-15 13:45:20 -04:00
|
|
|
env = clang_env(),
|
|
|
|
registry = "marketplace.gcr.io",
|
2019-06-25 04:07:01 -04:00
|
|
|
# We can't use the default "ubuntu16_04" RBE image provided by the autoconfig because we need
|
|
|
|
# a specific Linux kernel that comes with "libx11" in order to run headless browser tests.
|
2019-03-15 13:45:20 -04:00
|
|
|
repository = "google/rbe-ubuntu16-04-webtest",
|
2020-05-29 17:03:08 -04:00
|
|
|
use_checked_in_confs = "Force",
|
2019-03-15 13:45:20 -04:00
|
|
|
)
|