Commit Graph

249 Commits

Author SHA1 Message Date
Paul Gschwendtner 01577b0bed ci: bazel saucelabs test job does not setup circleci bazelrc (#29106)
Currently the `test_saucelabs` job does not use our general
CircleCI bazel configuration. We should set this configuration
up, as it enables better logging, better use of the `xlarge`
resource class, and also sets up Bazel's integrated flakiness
retry functionality.

PR Close #29106
2019-03-05 09:48:38 -08:00
Paul Gschwendtner 43ce6ec84a ci: print sauce-connect log output on timeout (#29084)
Currently when `sauce-connect` times out after 2min, we just
print a message saying that the SauceLabs tunnel didn't establish
within 2min. In order to make debugging easier, we now print the
full log file output on failure.

PR Close #29084
2019-03-04 10:10:28 -08:00
Paul Gschwendtner 58198075f2 ci: increase parallelism for "test_docs_examples" jobs (#28984)
Currently the docs example tests (`test_docs_examples_ivy`
and `test_docs_examples`) are the culprits for a slow-down
in our overall CI turnaround. We need to increase parallelism
in order to make our CI turnaround more _acceptable_. This is
temporary and the long-term goal is to move these tests to Bazel
with remote build execution.

References #28940

PR Close #28984
2019-02-28 10:46:12 -08:00
Paul Gschwendtner 2e43e15e12 ci: "test_docs_examples_ivy" should attach ivy package output (#28984)
Currently the "test_docs_examples_ivy" job attaches
the legacy package output, while we can also attach
the Ivy NPM package output. We don't need Ngcc to downlevel
the Angular packages in order to run the docs examples with Ivy.

PR Close #28984
2019-02-28 10:46:12 -08:00
George Kalpakas d207c4894a ci: speed up `publish_artifacts` CircleCI job for PRs (#29028)
PR Close #29028
2019-02-28 10:39:18 -08:00
Filipe Silva 3d48cde3b1 ci: add bazel_repository_cache to CircleCI workspace (#28935)
PR Close #28935
2019-02-25 08:14:49 -08:00
Filipe Silva 61495a138d ci: rename install job to setup (#28935)
Followup to https://github.com/angular/angular/pull/28928#pullrequestreview-207023800

PR Close #28935
2019-02-25 08:14:49 -08:00
Greg Magolan 10ba91b1d3 build: fix saucelabs_test cronjob in CI (#28939)
PR Close #28939
2019-02-22 16:21:43 -08:00
Filipe Silva f0989b786b ci: share data between jobs using workspaces (#28928)
PR Close #28928
2019-02-22 13:24:11 -08:00
Greg Magolan 3144bf4d73 build: fix CI config typo (#27721)
PR Close #27721
2019-02-22 13:07:08 -08:00
Greg Magolan 75357ecb32 build(bazel): run a number of web tests with karma_web_test in saucelabs in CircleCI (#27721)
PR Close #27721
2019-02-22 13:07:08 -08:00
Paul Gschwendtner 82820b0b2c ci: run saucelabs legacy tests every hour (#28903)
Initially when we introduced the cronjob for Saucelabs,
we specified that the tests should run every 4h. Since the
caretaker needs more recent results when merging PRs
or before creating a release, we should run the saucelabs
tests every hour. This still ensures that PRs are not
affected by Saucelabs flakiness or incidents, and
the caretaker can also react better to real browser
failures (and isn't blocked on a 4h time frame)

PR Close #28903
2019-02-22 09:52:06 -08:00
Filipe Silva 94223a09e5 ci: update circleci post checkout to v2 syntax (#28472)
The `post` key is part of the CircleCI 1.0 syntax is not available in the 2.0 syntax.

PR Close #28472
2019-02-21 22:17:38 -08:00
George Kalpakas 3f2b51b837 ci: make yarn globally available and independent of `$BASH_ENV` (#28889)
Previously, our yarn (which overwrote the pre-installed yarn on the
docker image) was only available through `$BASH_ENV` (as an exported
function). This caused it to be undefined for commands executed in other
shells (e.g. via Node.js' `child_process.spawn()` unless explicitly
configuring it to run with `bash`).

This commit fixes this by making our yarn version available globally via
a symlink (`/usr/local/bin/yarn`).

(This was accidentally broken in #28839.)

PR Close #28889
2019-02-21 12:37:53 -08:00
Paul Gschwendtner 13b96ac91d ci: run saucelabs unit tests as cronjob (#28787)
We no longer want to run Saucelabs for every PR/commit because
Saucelabs has been very flaky recently and it blocks most of the
PRs with a flaky failing state that we cannot fix most of the time due
to upstream Saucelabs failures/incidents. Since real browsers tests
rarely catch browser-specific failures (same as in Material), we should
only run Saucelabs in a cronjob on the upstream branches. This still
ensures/guarantees our browser compatibility, but makes our CI
more stable and the PR workflow more productive.

PR Close #28787
2019-02-20 16:45:59 -08:00
Paul Gschwendtner 623fd3fb5e build: remove legacy-unit-tests-local job (#28703)
Since all unit tests are now run with Bazel, we can remove
the local legacy unit tests job. We still need to keep the
Saucelabs legacy job until we can run all of these web
unit tests with Saucelabs and Bazel.

PR Close #28703
2019-02-20 16:31:48 -08:00
Alex Eagle 1832e0f293 build: use vendored yarn under Bazel (#28839)
PR Close #28839
2019-02-20 09:19:03 -08:00
Alex Eagle 9cecb0b5d2 ci: Vendor yarn into our repo (#28839)
This avoids a dynamic dependency on fetching a package from the internet in our CI.
We have observed that this is not 100% reliable.

PR Close #28839
2019-02-20 09:19:03 -08:00
Paul Gschwendtner 00a8b07896 ci: combine "define_env_vars" and "download_yarn" anchor (#28788)
As discussed in https://github.com/angular/angular/pull/28546#discussion_r254068014, we want to combine the
`define_env_vars` and `download_yarn` anchor since downloading Yarn depends on setting up the
environment variables. In addition this simplifies our setup and reduces code-duplication.

PR Close #28788
2019-02-19 12:39:45 -08:00
Paul Gschwendtner dba2a406fd build: remove legacy e2e tests job (#28645)
Now that all e2e integration tests within `modules/` have been
migrated to Bazel, we can remove the legacy e2e tests job.

PR Close #28645
2019-02-13 12:15:02 -08:00
Brandon 99e3a04ea2 ci(docs-infra): test docs examples with Ivy (#28463)
PR Close #28463
2019-02-11 17:16:52 +00:00
Filipe Silva 4b7264f60f ci: use fallback caches (#28545)
This PR adds fallback cache hits for partial cache restoration.

PR Close #28545
2019-02-07 16:45:53 -08:00
George Kalpakas e3032a0d17 ci(docs-infra): ensure `aio_monitoring` failure notifications do not depend on earlier steps (#28555)
Previously, in order for the `aio_monitoring` failure notifications to
work, the steps up to `define_env_vars` should have succeeded. This
meant that any failures in earlier steps would not send notifications.

This commit fixes it by making the notification step independent of the
`define_env_vars` step.

PR Close #28555
2019-02-06 06:21:58 -08:00
George Kalpakas 01bb3c5820 ci: save the cache in `build-npm-packages` job instead of `test` (#28555)
In most cases, it doesn't make a difference, because the cache does
already exist and is not saved. In the few cases where the dependencies
change (and the cache needs to be updated), it makes more sense to save
the cache in the `build-npm-packages` job, because most jobs depend on
it and thus will be able to take advantage of the updated cache right
away.

This seems to be an oversight in b26ac1c22.

PR Close #28555
2019-02-06 06:21:58 -08:00
George Kalpakas 43467c95ab ci: run the `yarn_install` step when necessary (#28555)
PR Close #28555
2019-02-06 06:21:58 -08:00
George Kalpakas 69ecb96569 refactor: use steps consistently in CircleCI config (#28555)
PR Close #28555
2019-02-06 06:21:58 -08:00
George Kalpakas e991d825f5 ci(docs-infra): fix `download_yarn` in `aio_monitoring` (#28555)
The `download_yarn` step depends on the `CI_YARN_VERSION` environment
variable and thus has to be run after the `define_env_vars` step.
Accidentally broken in [#28546][1].

[1]: https://github.com/angular/angular/pull/28546/files#diff-1d37e48f9ceff6d8030570cd36286a61R447

PR Close #28555
2019-02-06 06:21:58 -08:00
Matias Niemelä 979582a2ed build: add some debug info for yarn installs (#28553)
PR Close #28553
2019-02-05 20:15:49 -05:00
Paul Gschwendtner 8d11627e6c build: update yarn to v1.13.0 (#28546)
Currently our version of Yarn is installed through
the "circleci/node" docker image. This is problematic
because in order to be able to update Yarn, we always
need to update the docker image to a version that
comes with the desired Yarn version. Sometimes there
is no docker image with the desired latest Yarn version,
and therefore we cannot easily update the Yarn version.

Additionally updating the docker image also means that
we need to update our version of NodeJS, as well as the
version of `openssl` might have changed (meaning that
our encrypted credential files may not be decodable with
the new version of `openssl`)

PR Close #28546
2019-02-05 16:48:56 -05:00
George Kalpakas 9ef8d2b823 ci: keep job alive when yarn request takes more than 10 minutes (#28458)
Occasionally, yarn's requests take more than 10 minutes to
complete/fail, by which time CircleCI jobs due to no output.

This commit works around the issue by periodically printing something to
stdout.

PR Close #28458
2019-02-05 13:07:41 -05:00
Paul Gschwendtner 07fb4b5677 build: fix bazel repositories not cached on circleci (#28515)
Previously all Bazel repositories were cached on CircleCI
because the `experimental_repository_cache` flag has been
specified and the given repository cache directory has been
included in the CircleCI cache storage.

The directory is currently still included in the CircleCI
cache storage, but the `--repository_cache` flag is no longer
specified, and the cache directory is basically empty all the
time. The flag seems to have been removed accidentally within
SHA c8b70ae8e4.

We should specifiy this flag on the CI again, so that Bazel
doesn't need to install the Bazel managed node modules
all the time. This would slow down analysis phase on CI; and also
makes us dependent on the Yarn/NPM registry which often times out
if we fetch a lot of dependencies.

Also in order to make sure that cached Bazel repositories are
also most of the time in sync with what's currently defined in
the workspace, we need to update the cache key.

PR Close #28515
2019-02-05 13:06:24 -05:00
Paul Gschwendtner f6805de8eb build: fix circleci not restoring cache for PRs (#28480)
Currently whenever someone creates a pull request, the NPM dependencies
are downloaded and installed. This is problematic because we have a lot
NPM dependencies with potentially large files that would need to be
downloaded (e.g. the Bazel binaries).

The caches are currently not being restored because we added the
`{Branch}` variable to the CircleCI cache key. Since every PR has a different
branch name (e.g. `devversion/refs/heads/my-banch`), the cache keys would
never match an existing cache key, and the PR would start fresh by
downloading everything.

We can safely remove the `{Branch}` variable from the cache key because
it does not provide any value since the cached files are based on the state
of the `yarn.lock` file and not based on the current branch name. This reduces
our dependency on the slow and sometimes **flaky** Yarn registry. We should
try to depend as few as possible on external services (e.g. see how Saucelabs
flakiness can cause trouble for the caretaker; same applies to flaky Yarn installs)

PR Close #28480
2019-02-04 02:48:48 -08:00
George Kalpakas 72c36956de ci: pin ChromeDriver to a version compatible with docker image's Chrome (#28494)
By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in #26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: bfd48d156d/.circleci/config.yml (L16)
[2]: bfd48d156d/tools/ngcontainer/Dockerfile (L63)

PR Close #28494
2019-02-01 20:22:03 -05:00
George Kalpakas 895a8d6f3b ci: fix setting env var with spaces in value (#28494)
PR Close #28494
2019-02-01 20:22:03 -05:00
George Kalpakas 814ee260f5 ci(docs-infra): reduce output verbosity to improve log readability (#28494)
PR Close #28494
2019-02-01 20:22:03 -05:00
Jeremy Elbourn 1b33142595 build: run angular/material2 unit tests on ci (#28197)
PR Close #28197
2019-02-01 12:15:35 -05:00
Paul Gschwendtner 98e5af1480 build: switch example e2e tests to bazel (#28402)
* No longer builds the example e2e tests using "tsc". The examples are now built with Bazel and can therefore be built with Ivy by using the `--define=compile=aot` switch.
* No longer runs the example e2e tests using the protractor CLI. example e2e tests are executed with the Bazel protractor rule and can therefore run incrementally.

NOTE: Unit tests found within the examples are still running within the legacy jobs.

PR Close #28402
2019-01-28 19:21:09 -08:00
George Kalpakas e98d508df2 ci(docs-infra): compile with Ivy (#26947)
Jira: FW-552

PR Close #26947
2019-01-28 14:01:13 -08:00
George Kalpakas 7374dfd1fa docs: document why not using `compare-url` orb (#28010)
Discussed in
https://github.com/angular/angular/pull/27775#issuecomment-452565603.

PR Close #28010
2019-01-10 10:50:30 -08:00
George Kalpakas d72ae7b71e ci: compute commit range for rerun workflows (#27775)
On push builds, CircleCI provides `CIRCLE_COMPARE_URL`, which we use to
extract the commit range for a given build. When a workflow is rerun
(e.g. to recover from a flaked job), `CIRCLE_COMPARE_URL` is not
defined, causing some jobs to fail.

This commit fixes it by retrieving the compare URL from the original
workflow. It uses a slow process involving a (potentially large) number
of requests to CircleCI API.
It depends on the (undocumented) fact, that the `workspace_id` is the
same on all rerun workflows and the same as the original `workflow_id`.

PR Close #27775
2019-01-08 10:37:59 -08:00
Paul Gschwendtner 483f8250bf build: increase parallelism for "test_docs_examples" job (#27937)
PR Close #27937
2019-01-07 15:35:10 -08:00
Paul Gschwendtner 8e530a03b6 build: group sharded "test_docs_examples" jobs within circleci (#27937)
* Groups the two sharded `test_docs_examples` job using CircleCI's `parallelism` feature.  This makes the amount of jobs that show up on a PR, more reduced and also reduces code duplication for maintaining the Circle job definition.

PR Close #27937
2019-01-07 15:35:10 -08:00
Paul Gschwendtner 4fc41517d1 build: shard integration tests on circleci (#27937)
PR Close #27937
2019-01-07 15:35:09 -08:00
Paul Gschwendtner 7de7b7a16a ci: move e2e tests from travis to circleci (#27937)
PR Close #27937
2019-01-07 15:35:09 -08:00
Igor Minar 04ca3bcf10 ci: move local and saucelabs unit tests to circle (#27937)
Moving the tests over to CircleCI in pretty much "as-is" state just so that we can drop the dependency on Travis.

In the followup changes we plan to migrate these tests to run on sauce under bazel. @gregmagolan is working on that.

I've previously verified that all the tests executed in legacy-unit-tests-local already under bazel.
Therefore the legacy-unit-tests-local job is strictly not necessary any more, but given how flaky legacy-unit-tests-saucelabs is,
it is good to have the -local job just so that we can quickly determine if any failure is a flake or legit issue
(the bazel version of these tests could theoretically run in a slightly different way and fail or not fail in a different way, so having -lcoal job is just an extra safety check).

This change was coauthored with @devversion

PR Close #27937
2019-01-07 15:35:09 -08:00
Alex Eagle 44dd764d6d build: update to Bazel 0.20 (#27394)
refactor Bazel RBE configs

PR Close #27394
2018-12-07 14:29:03 -08:00
Alex Eagle cab5927bd5 ci: use buildifier binary release (#27489)
Switch from Skylint to buildifier --lint - this is required for the Bazel 0.20 upgrade since Bazel no longer lets us use the embedded JDK to build and run Java programs, and Skylint is a Java program

PR Close #27489
2018-12-07 09:27:32 -08:00
George Kalpakas 7ad6b0378c ci(docs-infra): manually trigger the preview server webhook (#27458)
With this change, we no longer depend on CircleCI to trigger the webhook
(which it sometimes does with considerable delay or not at all).

This has the added benefit that other jobs will not unnecessarily
trigger webhooks and spam the preview server logs. It is only the
`aio_preview` job's webhook that we care about.

Related to #27352.

PR Close #27458
2018-12-04 13:59:54 -08:00
Igor Minar 572fd7a79a build(ivy): remove the remains of ivy-jit mode (#27278)
This stuff is obsolete and shouldn't be here because we removed the JIT mode on CI.

PR Close #27278
2018-11-27 10:30:58 -08:00
Paul Gschwendtner 391767fb8f build: fix size artifacts not measured by github robot (#27042)
Currently the Github robot is not able to measure the artifacts of the `hello_world` and `todo` bundling tests because those will be only built with the `ivy-only` rule tag. This means that the current CircleCI job that is supposed to upload the size artifacts, does not even build those bundles.

PR Close #27042
2018-11-20 10:44:12 -08:00
Misko Hevery 7d2a746090 build: remove ivy JIT mode (#26863)
PR Close #26863
2018-11-02 15:44:05 -07:00
George Kalpakas beabfb7960 ci: remove redundant `start-xvfb` step (#26869)
Since 8fc4ae51f, the jobs that need Xvfb use `*-browser` CircleCI docker
image flavors (e.g. `circleci/node:10.12-browsers`), which automatically
start Xvfb.

PR Close #26869
2018-11-02 10:37:35 -07:00
Paul Gschwendtner 8fc4ae51fb 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
2018-10-30 16:19:13 -04:00
George Kalpakas ef6f1605db ci(docs-infra): notify caretaker about `aio_monitoring` failures (#26649)
PR Close #26649
2018-10-29 13:00:20 -04:00
Igor Minar cb71b93351 ci: use yarn test-ivy-... (#26735)
This means that we use the same command to run test on CI as when developing locally.

PR Close #26735
2018-10-26 14:48:05 -04:00
Igor Minar 30f319a11f build: remove ivy build/test tag hackery now that we can (#26735)
With https://github.com/bazelbuild/rules_nodejs/pull/388 fixed we can stop messing around
with tags and just rely on the explicitly defined tags.

PR Close #26735
2018-10-26 14:48:04 -04:00
George Kalpakas 9cd8327051 ci: move CircleCI env variables definition to shell script (#26596)
PR Close #26596
2018-10-26 13:22:52 -04:00
George Kalpakas 1d8f939c96 ci: add more info on how CircleCI env vars are defined (#26596)
PR Close #26596
2018-10-26 13:22:52 -04:00
George Kalpakas 2e28d9f012 ci: run Xvfb in the background on CircleCI (#26596)
PR Close #26596
2018-10-26 13:22:52 -04:00
George Kalpakas f8741c0985 ci(docs-infra): split `test_and_deploy_aio` to two separate jobs (#26746)
By splitting the jobs, if something goes wrong with deploying (e.g. a
network issue), we can re-run just that part instead of having to wait
for all the tests to complete again.

In terms of total duration, the difference should be minimal, because
the two operations (testing and deploying) do not depend on shared
tasks. For example, we need to build again (for the specific target
environment; e.g. stable, next, etc.) before deploying anyway.

PR Close #26746
2018-10-25 21:17:52 -04:00
George Kalpakas 1880c9531f ci: only publish builds if relevant `aio` jobs pass (#26722)
Some of the `aio`-/`docs`-related jobs rely on the locally built Angular
packages. When these jobs fail, it could mean that there is an issue
with the Angular packages (e.g. an unintentional breaking change).

This commit ensures that the `publish_artifacts` job is not run, unless
those `aio`-/`docs`-related jobs pass.

(The `test_aio_tools` job also uses the locally built Angular packages,
but it does not exercise them in a meaningful way to be worth making it
a prerequisite for `publish_artifacts`.)

PR Close #26722
2018-10-24 19:48:41 -04:00
George Kalpakas 6e16a17015 ci(docs-infra): fix deployment script (#26731)
PR Close #26731
2018-10-24 13:20:53 -07:00
George Kalpakas 38d626a3fa ci(docs-infra): move deployment to CircleCI (#26377)
PR Close #26377
2018-10-23 14:35:38 -07:00
George Kalpakas 9b8a244a15 ci: fix `payload-size.sh` (#26377)
PR Close #26377
2018-10-23 14:35:38 -07:00
George Kalpakas 1bbf28ad19 ci(docs-infra): add jobs to CircleCI config (#26377)
PR Close #26377
2018-10-23 14:35:37 -07:00
George Kalpakas 3b24e0edb6 build: use CI-provider independent variable names (#26377)
PR Close #26377
2018-10-23 14:35:37 -07:00
Igor Minar ee0b857172 build: rename the ivy compile mode 'local' to 'aot' (#26686)
PR Close #26686
2018-10-23 14:14:49 -07:00
Alex Eagle 2f9e957523 ci: re-encrypt .circleci/github_token (#26698)
PR Close #26698
2018-10-23 13:31:48 -07:00
Alex Eagle d0cc019c1a ci: re-encrypt github publish token with recent ngcontainer (#26692)
Something about the docker image changed such that the encrypted value is different

PR Close #26692
2018-10-23 12:00:20 -07:00
Igor Minar 4237c34c78 test(ivy): mark failing test targets with fixme-ivy-jit and fixme-ivy-local tags (#26471)
We are close enough to blacklist a few test targets, rather than whitelist targets to run...

Because bazel rules can be composed of other rules that don't inherit tags automatically,
I had to explicitly mark all of our ts_library and ng_module targes with "ivy-local" and
"ivy-jit" tags so that we can create a query that excludes all fixme- tagged targets even
if those targets are composed of other targets that don't inherit this tag.

This is the updated overview of ivy related bazel tags:

- ivy-only: target that builds or runs only under ivy
- fixme-ivy-jit: target that doesn't yet build or run under ivy with --compile=jit
- fixme-ivy-local: target that doesn't yet build or run under ivy with --compile=local
- no-ivy-jit: target that is not intended to build or run under ivy with --compile=jit
- no-ivy-local: target that is not intended to build or run under ivy with --compile=local

PR Close #26471
2018-10-23 08:57:42 -07:00
Alex Eagle 30d6233e83 build: update ngcontainer to bazel 0.18.0 (#26465) (#26488)
* build: update ngcontainer to bazel 0.18.0

* build: update skylint to bazel 0.18

use .bazelignore file to ignore node_modules directory

PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan d698b0eadf build: update to rules_typescript 0.20.1 and rules_nodejs 0.15.0 (#26260) (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
George Kalpakas decc0b840d ci(docs-infra): re-use env variable (#26138)
PR Close #26138
2018-10-08 12:01:02 -07:00
Pete Bacon Darwin eeebe28c0f ci(docs-infra): run the script in the correct folder 2018-09-27 09:04:53 -07:00
George Kalpakas e42bd012f9 ci(docs-infra): test PR previews on CI (#25671)
The deployment of PR previews is triggered by the notification webhook
of the `aio_preview` CircleCI job (which creates and stores the build
artifacts).

This commit adds a new job (`test_aio_preview`), which waits for the
preview to be deployed (for PRs that do have a preview) and then runs
some tests against it (currently only PWA tests).

Fixes #23818

PR Close #25671
2018-09-26 15:26:19 -07:00
George Kalpakas 48e73c1558 ci: only run `aio_preview` job on PR builds (#26030)
There can be no preview on non-PR builds, so there is no point in
running the job.

PR Close #26030
2018-09-20 09:32:44 -07:00
Sergej 8f0fcc3f71 feat(docs-infra): Add opensearch description (#25479)
Enables Chrome users to search angular.io and its subdomains from the browsers navigation bar.
Not sure if compatible with Firefox yet.
The queried term in the URL is removed after closing the search-results.

PR Close #25479
2018-09-19 15:31:49 -07:00
Wei Huang 5241ea086d test(bazel): Run Angular test on RBE (#25370)
PR Close #25370
2018-09-18 13:29:54 -07:00
Alex Eagle a53a559f5a ci: use locally built skylint and buildifier (#25917)
PR Close #25917
2018-09-18 13:14:35 -07:00
Alex Eagle bdbb2f9bfa ci: update to bazel 0.17 (#25967)
this includes support for @ character in labels, which we need for fine-grained deps

PR Close #25967
2018-09-17 12:51:52 -07:00
Alex Eagle 34ec9244a6 build: update to Node 10 (#25822)
PR Close #25822
2018-09-06 14:58:30 -07:00
Greg Magolan 910381ddbd build(bazel): fix bazel types reference directive resolves (#25581)
PR Close #25581
2018-08-31 11:12:03 -07:00
Alex Eagle c230173716 build: update Bazel to 0.16 (#25646)
PR Close #25646
2018-08-27 18:20:32 -04:00
Wei Huang c8b70ae8e4 build(bazel): Run build-packages-dist on RBE (#25237)
PR Close #25237
2018-08-20 16:34:45 -07:00
Pete Bacon Darwin 21d22ce4ad ci: ensure aio_preview job has needed node_modules (#25536)
PR Close #25536
2018-08-17 13:48:26 -07:00
Pete Bacon Darwin cc6f36a9d7 ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI
Previously, Travis pushed the build artitfacts to the preview server.
This required us to use JWT to secure the POST request from Travis, to
ensure we couldn't receive malicious builds.

JWT has been deprecated and we are moving our builds to CircleCI.

This commit rewrites the TypeScript part of the preview server that
handles converting build artifact into hosted previews of the docs.
2018-08-16 10:26:13 +01:00
Pete Bacon Darwin 364459c576 ci(docs-infra): move AIO preview deployment to CircleCI
Now instead of pushing the AIO build artifacts to the preview server
from inside a Travis job, the artifacts are built and hosted on the
CircleCI infrastructure. The preview server will then pull these
down after being triggered by a CircleCI build webhook.
2018-08-16 10:26:11 +01:00
Alex Eagle 090824526b ci: enforce formatting of .bzl files (#23544)
These are now enforced in google3 so we want to match, so that PRs don't get held up when we sync

PR Close #23544
2018-08-08 13:12:07 -07:00
Kara Erickson 843479449d Revert "build: update Bazel to 0.16 (#25316)" (#25391)
This reverts commit 4eb8ac6de9 because 0.16 is not
widely available yet (e.g. on Mac) and it is blocking the Angular release.

PR Close #25391
2018-08-08 10:52:23 -07:00
Alex Eagle 4eb8ac6de9 build: update Bazel to 0.16 (#25316)
PR Close #25316
2018-08-06 11:30:24 -07:00
Greg Magolan dd44f63c73 build(bazel): show bazel progress in CircleCI to prevent 10m timeout with no output (#24663)
PR Close #24663
2018-07-26 17:02:21 -07:00
Victor Berchet c0e3852384 Revert "build: update to newer circleCI bazel remote cache proxy (#25054)" (#25076)
This reverts commit d6016f1d1d.

PR Close #25076
2018-07-24 16:05:58 -07:00
Alex Eagle d6016f1d1d build: update to newer circleCI bazel remote cache proxy (#25054)
it fixes the error we currently get on CI

PR Close #25054
2018-07-24 08:20:28 -07:00
Alex Eagle 97277bc9fb build: update to Bazel 0.15 (#24841)
PR Close #24841
2018-07-13 15:05:16 -04:00
Alex Eagle 5aa12c73ae build: update to Bazel 0.14.0 (#24512)
Includes a fix for out-of-memory condition which caused this to be
reverted yesterday.

PR Close #24512
2018-06-14 10:04:42 -07:00
Alex Eagle 03f93b3772 Revert "build: update to Bazel 0.14.0 (#24296)" (#24492)
This reverts commit 0d07d273dc.

Fixes #24484

PR Close #24492
2018-06-13 16:47:18 -07:00
Alex Eagle 0d07d273dc build: update to Bazel 0.14.0 (#24296)
Also update usage of the ctx.actions.args to a newer preferred API

PR Close #24296
2018-06-12 11:42:35 -07:00
Alex Rickabaugh 7983f0a69b ci(ivy): configure CI environments for Ivy JIT and AOT (#24309)
Two new CircleCI environments are created: test_ivy_jit and test_ivy_aot.
Both run a subset of the tests that have been marked with Bazel tags as
being appropriate for that environment.

Once all the tests pass, builds are published to the *-builds repo both
for the legacy View Engine compiled code as well as for ivy-jit and ivy-aot.

PR Close #24309
2018-06-08 13:34:27 -07:00
Greg Magolan ec57133b61 build: update to rules_nodejs 0.9.1 and rules_typescript 0.15.0 (#24212)
PR Close #24212
2018-05-31 10:08:07 -07:00
Alex Rickabaugh 1eafd04eb3 build(ivy): support alternate compilation modes to enable Ivy testing (#24056)
Bazel has a restriction that a single output (eg. a compiled version of
//packages/common) can only be produced by a single rule. This precludes
the Angular repo from having multiple rules that build the same code. And
the complexity of having a single rule produce multiple outputs (eg. an
ngc-compiled version of //packages/common and an Ivy-enabled version) is
too high.

Additionally, the Angular repo has lots of existing tests which could be
executed as-is under Ivy. Such testing is very valuable, and it would be
nice to share not only the code, but the dependency graph / build config
as well.

Thus, this change introduces a --define flag 'compile' with three potential
values. When --define=compile=X is set, the entire build system runs in a
particular mode - the behavior of all existing targets is controlled by
the flag. This allows us to reuse our entire build structure for testing
in a variety of different manners. The flag has three possible settings:

* legacy (the default): the traditional View Engine (ngc) build
* local: runs the prototype ngtsc compiler, which does not rely on global
  analysis
* jit: runs ngtsc in a mode which executes tsickle, but excludes the
  Angular related transforms, which approximates the behavior of plain
  tsc. This allows the main packages such as common to be tested with
  the JIT compiler.

Additionally, the ivy_ng_module() rule still exists and runs ngc in a mode
where Ivy-compiled output is produced from global analysis information, as
a stopgap while ngtsc is being developed.

PR Close #24056
2018-05-29 18:02:29 -04:00
Fabian Wiles 858e48a794 ci: add config for size plugin of the github rebot (#23665)
PR Close #23665
2018-05-10 07:53:34 -07:00
Alex Eagle e3e15773ee build: update bazel to 0.13 (#23623)
PR Close #23623
2018-05-04 15:23:55 -07:00
Alex Eagle cccc328a52 ci: fix github_token following README (#23658)
PR Close #23658
2018-05-02 21:41:10 -07:00
Alex Eagle b45fa5e263 ci: hide encryption key from circleci logs (#23585)
PR Close #23585
2018-05-02 16:43:13 -07:00
Alex Eagle b4c252bcc5 build: serve ivy todo app with real http-server (#23446)
PR Close #23446
2018-04-25 15:51:18 -07:00
Alex Eagle 1c9200eca8 ci: require green integration tests to publish snapshot (#23517)
Now looks like https://circleci.com/workflow-run/921ffc90-cff6-4f48-97df-740d60d5bf2b

PR Close #23517
2018-04-23 16:50:16 -07:00
Alex Eagle ace6440460 ci: fix snapshot publishing (#23516)
PR Close #23516
2018-04-23 16:32:38 -07:00
Alex Eagle b26ac1c22f ci: publish build snapshots from Bazel/CircleCI (#23512)
This uses a new script and CircleCI job called "build-packages-dist"
which shims the new Bazel build to produce outputs matching the legacy
build. We'll use this to get AIO testing onto CircleCI as well.

We move the integration tests to a new circleCI job that depends on this
one, as well as the build publishing job.

Note that every PR will have a trivial green publishing status, because
we always create this job even for PRs. We'd rather not - see
https://discuss.circleci.com/t/workflows-pull-request-filter/14396/4

PR Close #23512
2018-04-23 15:45:56 -07:00
George Kalpakas 29b838c35d ci: define common env vars in CircleCI job (#22810)
PR Close #22810
2018-04-13 16:30:50 -07:00
Alex Eagle 328b48b697 test: integration tests now against bazel built packages (#22810)
PR Close #22810
2018-04-13 16:30:50 -07:00
Alex Eagle b3a10e0a42 build: update Bazel dependency to 0.11.1 (#23297)
PR Close #23297
2018-04-10 23:01:30 -07:00
Alex Eagle 10ecdb13bf ci: do bazel build and test in parallel (#23290)
We care more about optimizing the build speed on CI than we do having a simple example to copy-paste from.
PR Close #23290
2018-04-10 13:13:34 -07:00
Alex Eagle 580f05bd9c build: flatten esm5 sources before rollup (#23131)
this is needed to update to latest rules_nodejs due to breaking change in
https://github.com/bazelbuild/rules_nodejs/pull/172
It has the side-effect of correctly marking rxjs packages as side-effect-free

PR Close #23131
2018-04-03 10:47:29 -07:00
George Kalpakas 6cb1adf105 ci(aio): add monitoring for angular.io (#22483)
This commit configures a periodic job to be run on CircleCI, performing several
checks against the actual apps deployed to production (https://angular.io) and
staging (https://next.angular.io).

Fixes #21942

PR Close #22483
2018-03-30 15:26:50 -07:00
Alex Eagle 4f0cae0676 build: allow bazel build //... (#22168)
Also switch our CircleCI commands to just
bazel build //...
bazel test //...
as this is easier to understand.

Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"

PR Close #22168
2018-03-23 15:02:32 -05:00
Alex Eagle 8407fcc979 ci: double our cores on CircleCI (#22641)
This should cut our build time in ~half, assuming it's widely parallel.
See
https://circleci.com/docs/2.0/configuration-reference/#resource_class

Also enable bazel repository caching, and store the external
repositories in the CircleCI cache for later builds.

PR Close #22641
2018-03-07 21:00:03 -08:00
Alex Eagle ec445b5c73 ci: speed up lint job on CircleCI (#22526)
When I enabled bazel remote caching, I also switched to running
buildifier and skylint from the package.json script, which builds them
from head. With remote caching, we do get cache hits for these, but
looking up the action inputs actually takes quite a bit of time since we
have to first fetch the remote repository, then do loading and
analysis, then read the inputs to determine the cache key.

It's more important to keep the lint job fast, so I'm reverting that
part of the change for now. We can experiment with building them from
head in a less critical repo.

PR Close #22526
2018-03-01 09:12:58 -08:00
Matias Niemelä 0aa9b46b79 Revert "build: allow bazel build ... (#22168)"
This reverts commit 265ac8a106.
2018-02-15 03:28:35 -08:00
Alex Eagle 265ac8a106 build: allow bazel build ... (#22168)
Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"

PR Close #22168
2018-02-14 15:01:41 -05:00
Alex Eagle 8ec21fc325 ci: enable bazel remote caching on CircleCI (#21784)
This should cause Bazel builds to be incremental, only re-building parts of Angular affected by changes since the last build.
It also fixes a potential version skew, where CI was running the Bazel linter binaries in the ngcontainer docker image, but developers built them using the versions in WORKSPACE

PR Close #21784
2018-02-13 10:10:41 -08:00
Alex Eagle 16e5b866d2 test(ivy): also track the size of the compressed hello world bundle (#22056)
PR Close #22056
2018-02-07 16:10:00 -08:00
Alex Eagle 370ab66c4f build(ivy): create hello world rollup (#22004)
This is a customization of the rollup_bundle rule from rules_nodejs
which adds the build-optimizer as a plugin.

Add a functional test with fast round-trip that asserts the minified app
still works.

Publish the min.js artifact on circleCI so we can track its size.

PR Close #22004
2018-02-06 08:25:22 -08:00
Alex Eagle a1492a73ce build: Remove angular_src nested workspace (#21096)
PR Close #21096
2018-01-19 10:17:37 -08:00
Miško Hevery a33ff2c68f docs(ivy): add Ivy as a recognized label (#21428)
PR Close #21428
2018-01-10 15:31:54 -08:00
Misko Hevery ef956a20c3 build: add bazel rulse for benchmarks (#21436)
PR Close #21436
2018-01-10 11:58:53 -08:00
Alex Eagle 463e2872a6 build: upgrade Bazel to 0.9.0 (#21335)
Also install the skylark linter for .bzl files.

PR Close #21335
2018-01-09 10:28:46 -08:00
Miško Hevery 83c1383701 build: upgrade circle/build into large class (more ram) (#21053)
PR Close #21053
2017-12-22 13:10:51 -08:00
Alex Eagle 6d57cb04f6 ci: parallelize bazel build and test
The current setup can cause a de-optimization where unit tests can't start running until the slowest build target completes.
2017-12-14 08:28:52 -08:00
George Kalpakas 3401283399 ci: clean up `circleci/config.yml` (#20954)
PR Close #20954
2017-12-12 11:55:44 -08:00
Jason Aden add3589451 ci: use container version in cache key (#20952)
PR Close #20952
2017-12-11 16:07:28 -08:00
Alex Eagle db06cb170f build: new docker image, faster to boot on circleci 2017-12-11 11:16:29 -08:00
Alex Eagle 77a1f9f2e8 ci: print the buildifier command when BUILD lint fails (#20882)
PR Close #20882
2017-12-11 11:15:47 -08:00
Alex Eagle ef534c0cc1 build: upgrade bazel rules to latest (#20768)
Add enough BUILD files to make it possible to
`bazel build packages/core/test`

Also re-format BUILD.bazel files with Buildifier.
Add a CI lint check that they stay formatted.

PR Close #20768
2017-12-07 11:27:50 -08:00
Alex Eagle 6790e02a13 ci: upgrade to node 8 and Bazel 0.8 (#20807)
Closes #19648

PR Close #20807
2017-12-06 06:58:33 -08:00
George Kalpakas 910735d732 build: fix `yarn install` command (`--freeze-lockfile` --> `--frozen-lockfile`) 2017-10-20 10:14:30 -07:00
Tobias Bosch ad130d62d8 fix(compiler): add first bazel test for `ng_module` (#19703)
We were missing quite a bit of test coverage,
this is the start of recreating it.
PR Close #19703
2017-10-17 15:18:31 -07:00
Peter Bacon Darwin 566606ef46 ci: freeze yarn lockfile when installing dependencies (#19616)
PR Close #19616
2017-10-11 11:52:36 -07:00
Olivier Combe f48b343af1 build: switch from npm to yarn (#19328)
PR Close #19328
2017-09-22 13:20:52 -07:00
Alex Eagle 580372f23d build: pin docker image to a tag for CircleCI (#19295)
Fixes the broken build
PR Close #19295
2017-09-20 12:34:48 -07:00
Alex Eagle f2f5286020 build: upgrade to latest bazel rules (#18733)
PR Close #18733
2017-08-23 11:34:52 -05:00
Alex Eagle 0317c4c478 build: update bazel rules to latest (#18289) 2017-07-21 18:09:44 -05:00
Miško Hevery b7a6f52d59 perf: latest tsickle to tree shake: abstract class methods & interfaces (#18236)
In previous version of tsickle abstract class methods were materialized.
The change resulted in 6Kb savings in angular.io bundle.

This change also required the removal of `@private` and `@return` type
annotation as it is explicitly dissalowed by tsickle.

NOTE: removed casts in front of `makeDecorator` due to:
https://github.com/angular/devkit/issues/45

```
 14938 Jul 19 13:16 0.b19e913fbdd6507d346b.chunk.js
  1535 Jul 19 13:16 inline.d8e019ea3cfdd86c2bd0.bundle.js
589178 Jul 19 13:16 main.54c97bcb6f254776b678.bundle.js
 34333 Jul 19 13:16 polyfills.4a3c9ca9481d53803157.bundle.js

 14938 Jul 18 16:55 0.b19e913fbdd6507d346b.chunk.js
  1535 Jul 18 16:55 inline.0c83abb44fad9a2768a7.bundle.js
582786 Jul 18 16:55 main.ea290db71b051813e156.bundle.js
 34333 Jul 18 16:55 polyfills.4a3c9ca9481d53803157.bundle.js

main savings: 589178 - 582786 = 6,392
```

PR Close #18236
2017-07-21 16:35:37 -05:00
Alex Eagle a7ea0086ee ci: fast-forward to master/HEAD on all circle jobs (#18101)
This problem was introduced by a bad merge.
2017-07-13 12:16:02 -07:00
Jason Aden 68fc65dbcb ci: add npm postinstall back to the lint step so node_modules doesn't get out of date 2017-06-26 17:12:06 -07:00
Alex Eagle 08ecfd891d build: No longer need to bazel build twice 2017-06-23 11:54:51 -07:00
Alex Eagle 7395a64668 build: circleci workflows to run lint in parallel 2017-06-23 11:54:51 -07:00
Alex Eagle 414c7e956b ci: test merge commits on circle
We expect this behavior because it's what Travis does. Also it's better because we want
to test what happens if we merge the PR, not the status of the PR branch.
2017-06-23 11:52:41 -07:00
Alex Eagle fa81c8eeb3 ci: use npm_install for bazel
using yarn_install polluted our node_modules cache because it disregards the npm_shrinkwrap.json
2017-06-13 13:35:01 -07:00
Alex Eagle 47c2a2e411 ci: switch CircleCI to 2.0
This lets us use a docker container to provide things like the Bazel build tool
2017-06-05 11:18:20 -07:00