build: use bazel version from node modules (#26691)
* No longer depends on a custom CircleCI docker image that comes with Bazel pre-installed. Since Bazel is now available through NPM, we should be able to use the version from `@bazel/bazel` in order to enforce a consistent environment on CI and locally. * This also reduces the amount of packages that need to be published (ngcontainer is removed) PR Close #26691
This commit is contained in:

committed by
Matias Niemelä

parent
cd444bc2ba
commit
c44b93253c
@ -22,7 +22,7 @@ if [[ "$(git tag)" == "" ]]; then
|
||||
echo "Either fetch the tags:"
|
||||
echo " git fetch git@github.com:angular/angular.git --tags"
|
||||
echo "or build without stamping by giving an empty workspace_status_command:"
|
||||
echo " bazel build --workspace_status_command= ..."
|
||||
echo " yarn bazel build --workspace_status_command= ..."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
@ -164,7 +164,7 @@ def ts_web_test_suite(bootstrap = [], deps = [], **kwargs):
|
||||
deps = local_deps,
|
||||
# Run unit tests on local Chromium by default.
|
||||
# You can exclude tests based on tags, e.g. to skip Firefox testing,
|
||||
# `bazel test --test_tag_filters=-browser:firefox-local [targets]`
|
||||
# `yarn bazel test --test_tag_filters=-browser:firefox-local [targets]`
|
||||
browsers = [
|
||||
"@io_bazel_rules_webtesting//browsers:chromium-local",
|
||||
# Don't test on local Firefox by default, for faster builds.
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
This docker container provides everything needed to build and test Angular applications:
|
||||
|
||||
**Note**: This docker image will be no longer actively updated. Consider using other Docker
|
||||
images that come with Node installed. Bazel can be installed through the `@bazel/bazel` NPM package.
|
||||
|
||||
- node 10.9.0
|
||||
- npm 6.2.0
|
||||
- yarn 1.9.2
|
||||
|
@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import {SymbolExtractor} from './symbol_extractor';
|
||||
|
||||
if (require.main === module) {
|
||||
@ -44,7 +43,7 @@ function main(argv: [string, string, string] | [string, string]): boolean {
|
||||
const defineFlag = (compile !== 'legacy') ? `--define=compile=${compile} ` : '';
|
||||
console.error(`TEST FAILED!`);
|
||||
console.error(` To update the golden file run: `);
|
||||
console.error(` bazel run ${defineFlag}${process.env['BAZEL_TARGET']}.accept`);
|
||||
console.error(` yarn bazel run ${defineFlag}${process.env['BAZEL_TARGET']}.accept`);
|
||||
}
|
||||
}
|
||||
return passed;
|
||||
|
@ -23,8 +23,8 @@ ts-api-guardian --verifyDir api_guard [--rootDir .] core/index.d.ts core/testing
|
||||
Build and test this library:
|
||||
|
||||
```sh
|
||||
$ bazel run //:install
|
||||
$ bazel test //tools/ts-api-guardian:all
|
||||
$ yarn bazel run //:install
|
||||
$ yarn bazel test //tools/ts-api-guardian:all
|
||||
```
|
||||
|
||||
Publish to NPM:
|
||||
@ -32,5 +32,5 @@ Publish to NPM:
|
||||
```sh
|
||||
$ npm whoami # should be logged in as angular
|
||||
$ grep version tools/ts-api-guardian/package.json # advance as needed
|
||||
$ bazel run //tools/ts-api-guardian:ts-api-guardian.publish
|
||||
$ yarn bazel run //tools/ts-api-guardian:ts-api-guardian.publish
|
||||
```
|
||||
|
Reference in New Issue
Block a user