Commit graph

621 commits

Author SHA1 Message Date
Derek Cormier
9d4211e52b build(bazel): fix aio payload test to work with bazel output
Was pointing to legacy build dist folder.
2022-11-22 13:51:16 -07:00
Doug Parker
487ad9d0bb build: add --keep_going to components tests. (#47958)
This configures CI to run all the tests and report all the failures instead of aborting after the first one.

PR Close #47958
2022-11-03 17:52:38 -07:00
Paul Gschwendtner
739e689630 build: setup remote execution through shared command (#47537)
Sets up remote execution through a shared command.

PR Close #47537
2022-10-07 09:31:30 -07:00
Alan Agius
b2aa9ce3e5 build: update puppeteer to 18.0.5 (#47584)
This is needed as Angular does not support Chrome 93.

PR Close #47584
2022-09-30 10:53:04 -07:00
Paul Gschwendtner
b757b1387c build: update dev-infra packages and account for build-tooling split from ng-dev (#46976)
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.

PR Close #46976
2022-08-02 09:37:37 -07:00
Angular Robot
2808d889dc build: update dependency firebase-tools to v11 (#46779)
See associated pull request for more information.

PR Close #46779
2022-07-11 21:42:08 +00:00
Paul Gschwendtner
7562421353 ci: do not run firefox components repo tests (#46624)
It seems like the tag for Firefox web tests has changed, and we need to adjust our filter.
PR Close #46624
2022-06-29 12:56:45 -07:00
Joey Perrott
cb452e615f build: remove scripts and documentation about individual usage of RBE (#46515)
As there is little to no usage of RBE by individuals and we don't actively ensure
that the process and permissions are working for individuals the documentation is
best removed from the repo.

PR Close #46515
2022-06-27 10:50:08 -07:00
Joey Perrott
e026a9f174 build: remove the previous release scripts as they are unused (#46516)
With the completed migration to our new release tooling, the previous release
scripts are entirely unused.

PR Close #46516
2022-06-27 10:49:43 -07:00
Paul Gschwendtner
d248d83c17 build: convert release package build scripts to typescript (#46456)
Follow-up to: cce395a928.

PR Close #46456
2022-06-22 14:35:31 -07:00
Paul Gschwendtner
cce395a928 build: load ng-dev release package builder using CJS interop (#46454)
We need to switch the package builder to ESM or TS, like we did
in the components repo, but for now until we can, the release script
should work by loading the package builder CJS through the dynamic
import expression.

PR Close #46454
2022-06-22 09:14:07 -07:00
Paul Gschwendtner
736b5456ea ci: override existing snapshot tag if publish snapshot job is restarted (#46366)
If the snapshot publish job is manually being restarted, the tag in the
snapshot repo might already exist and the job will fail. We can just
forcibly re-create the tag (even if it will be at the same revision).

We use force mode in a couple of other command as well, such as `git
push` of the actual tag and snapshot revision/SHA.

PR Close #46366
2022-06-15 15:57:56 +00:00
Paul Gschwendtner
0bb8c48ae7 build: fix unbound variable error in build artifact script (#46076)
We recently had a couple of issues with the shallowing of snapshot
git repositories. In an attempt to fix this, parts of the publish
script of the COMP repo have been used, but variables have not been
updated properly.

This commit fixes an unbound variable, avoiding errors when snapshots
are published for a new branch (e.g. when we branch-off).

PR Close #46076
2022-05-23 13:26:32 -07:00
Joey Perrott
e1a93e4d7c build: manually unshallow the repo for builds publishing, use absolute paths (#45979)
Use the absolute path for the artifacts directory, as well as encapsulate the clone
vs init logic to prevent it from changing directories.

Manually remove the shallow marker so that git does not recognize this as a shallow repo.

PR Close #45979
2022-05-13 09:07:47 -07:00
Joey Perrott
0db2841ea2 build: use clone instead of init for creating the builds commit changes (#45975)
Rather than using git init to create an empty repo and then shallow fetch the
repo for a specific branch, we shallow clone the repository itself for the branch.
This prevents us from running into the issue of Github denying the push because it
comes from a shallow branch which does not map back to the repository.

PR Close #45975
2022-05-12 20:31:45 +00:00
Joey Perrott
3dcf25b83d build: set the default branch of the ephemeral repo for publishing build artifacts to main (#45974)
It looks like because the primary branch for our ephemeral repos doesn't match the build repos
we are pushing to it causes errors around shallow clones.  This attempts to prevent this.

PR Close #45974
2022-05-12 19:39:36 +00:00
Paul Gschwendtner
949927edda build: remove outdated/obsolete github PR utility scripts (#45868)
Removes scripts and documentation for tools which are no longer
actively used and likely do not work anyway at this point.

All of our PR-related tooling has moved into the `yarn ng-dev` command.
The `PR_REVIEW` markdown file is deleted since it was soley about
the legacy review scripts and the PR review workflow also does not
seem like the common/standard workflow Angular team members follow.

PR Close #45868
2022-05-04 16:29:27 -07:00
Paul Gschwendtner
68a6a075f4 build: clean up references to old master branch (#45856)
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
2022-05-04 16:23:33 -07:00
Paul Gschwendtner
0231a363fe build: preparation for primary branch rename in the Angular repos (#45681)
Preparation for the framework repo as outlined our planning
document.

PR Close #45681
2022-04-19 20:19:46 -07:00
Paul Gschwendtner
31434943f1 build: disable payload size uploading within bazel (#45446)
Uploading payload size is unreliable from within Bazel. This is
because tests might not run for every commit, tests might have
been cached from a pull request RBE-build (causing payload uploading
to be skipped most of the time as every change comes from a PR)

We should disable the uploading as this is a fundamental problem
(good thing to note now) that we can solve with better payload
size tracking that we want to establish as part of dev-infra.

PR Close #45446
2022-03-25 16:50:09 -07:00
Paul Gschwendtner
1177b4e2f8 ci: make payload size tracking script work with CircleCI and Bazel limitation (#45444)
For quite some time now, since we started to use Bazel for integration tests, we
relied on some size tracking logic that did not actually fully work under Bazel.

It was thought that all the necessary CI push/PR information is available to the
Bazel test, but that was not the case. This was now fixed with the recent Rules NodeJS
v5 update where I made sure the `env.sh` variables are actually available before we
write them to the temporary file for the Bazel-access.

This now will unveil an issue because payload size goldens would start being based
on their branch name. e.g. the golden key in `13.3.x` should not be `master` but
`13.3.x`. This makes more sense than `master` as key, but makes things more
cumbersome and ideally we would not store the branch name at all (this is a larger
change though -- not worth now since we might refactor this anyway). For now we will
update the size tracking logic to always use `master` as golden key (like it worked
in the past year(s))

With the environment fix we now (again) start uploading payload size results to Firebase.
This did not work by accident either. The uploading logic is reliant on the CircleCI
commit range which is not working/reliable in upstream branches. This commit
removes this reliance on `COMMIT_RANGE` since it's not strictly necessary and
currently breaking renovate PRs. We can re-enable this when we have a solution with
CircleCI, or a workaround/resolution logic provided in e.g. `ng-dev ci determine-commit-range`.

PR Close #45444
2022-03-25 14:25:03 -07:00
Tobias Speicher
4ddcf81e61 refactor: replace deprecated String.prototype.substr() (#45397)
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

PR Close #45397
2022-03-24 11:48:09 -07:00
JiaLiPassion
886cfe82d0 ci: components CI test should use local zone.js build (#45277)
CI components test install the angular package from the local
version, but still use the zone.js from npm, so this commit let
components also install zone.js from local too.

PR Close #45277
2022-03-07 11:34:58 -08:00
Kristiyan Kostadinov
30c52ac126 build: add retry logic to postinstall script (#45252)
Several people on the team (myself included) have had issues where the `webdriver-manager` step of the `postinstall` script fails on the first run, but work correctly on the second one.

These changes attempt to simplify the workflow by retrying the script up to 3 times before giving up.

PR Close #45252
2022-03-03 09:13:25 -08:00
Paul Gschwendtner
df50af2bc5 ci: only build test targets for components repo unit test job (#44832)
To speed up the components CI job (avoiding it being a bottleneck in FW),
we will stop building everything in `src/...`, but rather only build targets
which are needed to run all tests within `src/...`.

This notably should avoid unnecessary NPM package building. Arguably that
part would also be valuable to have, but we already test the `ng_package`
rule in FW itself, plus we run snapshot tests in the components repo as well.

PR Close #44832
2022-01-27 09:22:23 -08:00
George Kalpakas
bc5e29592c build: use the latest version of Chrome (v93) in non-bazel tests (#43880)
This commit updates the version of Chrome used in non-bazel tests (via
Puppeteer) to the latest (v93).

PR Close #43880
2021-10-29 13:10:25 -07:00
Joey Perrott
00d801122c build: Use Ivy compiler for bazel builds by default (#43862)
Setting the angular_ivy_enabled environment variable to True will default Bazel builds to use the Ivy
compiler rather than defaulting to ViewEngine.

PR Close #43862
2021-10-19 10:06:54 -07:00
Joey Perrott
9f40d2a0ea ci: remove browserstack configuration (#43881)
Remove browserstack configuration from the repo as it is not used for our CI.

PR Close #43881
2021-10-18 15:00:22 -07:00
Paul Gschwendtner
baf8da0f0f ci: re-enable dev-app building in components-repo-unit-tests job (#43798)
Re-enables the building of the `src/dev-app` package in the components
repo when the components-repo-unit-test job runs. We previously disabled
the dev-app because it was not compatible with template typechecking of
ngtsc. This should be fixed now and can re-enable it.

This could be valuable for having some actual real test scenarios of
type checking.

PR Close #43798
2021-10-12 17:42:46 +00:00
Paul Gschwendtner
167fb2b37f ci: re-enable components-repo-unit-tests job after APF v13 adjustments (#43798)
The APF v13 changes have landed in the `angular/components` repository
so that the CI check can be re-enabled.

PR Close #43798
2021-10-12 17:42:46 +00:00
Paul Gschwendtner
b5b3c73c8b build: allow for custom bazel binary to be used in package-builder (#43431)
The package builder script should respect the `BAZEL` environment
variable for running Bazel. If not set, it can fallback to bazelisk
from the `node_modules`. Respecting this variable allows for users
with a global `bazel` binary. This is desirable in some situations,
like on Windows, where running Bazel inside of the Yarn environment
seems slower than running a global variant. This could appear like that
because projects might use different Bazel versions. In some cases,
developers would want to use a single (already-warmed-up) instance of
Bazel instead of launching different versions using bazelisk.
(e.g. when switching a lot between repos like COMP, FW or CLI..)

In any case, it doesn't hurt providing this flexibility for advanced
use-cases. It's low-effort to maintain and is respected in COMP as well.

PR Close #43431
2021-10-01 18:28:46 +00:00
Paul Gschwendtner
0cc8679567 build: set executable bit for build-packages-dist script (#43431)
Sets the executable bit for the build-packages-dist script so that
the script can be invoked directly without having to explicitly
prefix it with the `node` command.

PR Close #43431
2021-10-01 18:28:44 +00:00
Paul Gschwendtner
fcd958dd9f build: update build scripts to no longer build View Engine output (#43431)
Removes View Engine compilation from the package builder script. For
v13, we can no longer ship View Engine packages.

PR Close #43431
2021-10-01 18:28:42 +00:00
George Kalpakas
9d290bd012 ci: correctly handle commit message with carriage returns in payload-size.sh (#43569)
Previously, if a commit message contained a carriage return in its
header, the `payload-size.sh` script would fail to upload the payload
size data to Firebase, because the JSON payload would be messed up when
trying to concatenate the commit message headers. See an example
[here][1].

This commit avoids this problem by replacing carriage returns before
concatenating the commit message headers with the JSON payload string.

[1]: https://app.circleci.com/pipelines/github/angular/angular/37437/workflows/d0fa4adf-43bb-464e-a2fd-d87da15226dd

PR Close #43569
2021-09-24 10:56:41 -07:00
Joey Perrott
4db80d69d7 ci: stop publishing snapshots to angular/dev-infra-private-builds (#43059)
We no longer publish to angular/dev-infra-private-builds as the dev-infra
content has been moved to angular/dev-infra.

PR Close #43059
2021-08-05 16:05:03 -07:00
Paul Gschwendtner
57865b352a ci: do not update shared dev-infra package in components-repo-unit-tests job (#42268)
The shared dev-infra package from `HEAD` should not be installed
when running the `components-repo-unit-tests` job. This is done
because otherwise changes to the dev-infra package can result in
build setup issues for the CI job (while the goal of the CI job
is to test the framework)

PR Close #42268
2021-06-03 10:37:41 -07:00
Zach Arend
6a970167de build: use wombat-dressing-room proxy for publishing releases (#42357)
In the scripts to release latest and next, use the npm proxy for publishing the
release.

PR Close #42357
2021-05-26 17:51:12 +00:00
Paul Gschwendtner
7fb8527e1e refactor(dev-infra): remove invoke bazel clean command from release tool (#42101)
Currently the ng-dev release tool always run `bazel clean` before
calling the configured build release function. The clean is necessary
to ensure the release output is actually built; and not restored
from previous builds which could have different bazel workspace
status variables (which provide the NPM package version).

Instead of doing this as part of the release tool, the
actual script running to build the release output should
run the `bazel clean`. The release tool does not intend to
know about details on how the release output is built. This
is necessary because the build setup could vary between version
branches (especially for older ones; such as LTS version branches).

PR Close #42101
2021-05-14 21:06:09 +00:00
Pete Bacon Darwin
76c824b6da build(docs-infra): update to latest puppeteer (#41764)
The updates to WebDriver required an update to puppeteer to ensure
that the correct Chromium was downloaded.

PR Close #41764
2021-04-28 12:33:20 -07:00
George Kalpakas
4ae57cabd8 build: correctly publish angular-in-memory-web-api as CI build artifact (#41429)
Previously, the `angular-in-memory-web-api` package was built in
`dist/packages-dist/misc/angular-in-memory-web-api/`. This was different
from other Angular packages, which were placed directly in
`dist/packages-dist/`. This caused the `create-package-archives.sh`
script to create an invalid `misc.tgz` archive (i.e. treating the
`misc/` subdirectory as a package).
See, for example, the artifacts [here][1].

This commit changes the build scripts to have the
`angular-in-memory-web-api` package built in
`dist/angular-in-memory-web-api-dist/`, similar to how the `zone.js`
package is handled. It also updates the CircleCI config to correctly
publish the `angular-in-memory-web-api` package to CI build artifacts.

[1]: https://circleci.com/gh/angular/angular/951491

PR Close #41429
2021-04-06 10:22:54 -07:00
George Kalpakas
e7179893f9 build: build angular-in-memory-web-api when building packages with Ivy (#41429)
This commit updates the `build-ivy-npm-packages.js` script to also build
the `angular-in-memory-web-api` package. This could be used if someone
wanted to test the Ivy packages in docs examples or an integration test.

PR Close #41429
2021-04-06 10:22:54 -07:00
George Kalpakas
3c48037d24 build: make the build scripts for the various packages consistent (#41429)
This commit makes the build scripts for the various packages (framework,
`@angular/dev-infra-private`, `angular-in-memory-web-api`, `zone.js`)
consistent. This makes it easier to maintain them (e.g. make similar
changes across all build scripts).

PR Close #41429
2021-04-06 10:22:54 -07:00
Pete Bacon Darwin
18bc9ffb51 ci: do not try to publish directories that are not packages (#41393)
We now include `misc/angular-in-memory-web-api` in the packages that
are build in the `dist/packages-dist` directory. But this package should
not be published as an artifact.

This commit prevents attempting to publishing the `misc` directory by
first checking whether the directory contains a `package.json` file.

PR Close #41393
2021-04-01 11:26:11 -07:00
Alan Agius
300d6d1e38 build(docs-infra): support building the local angular-in-memory-web-api package in NgPackagesInstaller (#41313)
In some cases, we want to test the AIO app or docs examples against the locally built `angular-in-memory-web-api` for example to ensure that the changes in a commit do not introduce a breaking changes.

PR Close #41313
2021-03-29 15:14:16 -07:00
George Kalpakas
531f0bfb4a ci: improve error message when payload size check fails (#41116)
Previously, when a payload size check failed, the error message prompted
the user to update the size limits using a CI-specific file path, which
was confusing (esp. for external contributors). See, for example,
https://circleci.com/gh/angular/angular/932733.

This commit improves the error message by printing the file path
relative to the repository root instead.

PR Close #41116
2021-03-08 10:03:59 -08:00
Alan Agius
d51d39cb4c docs: update docs to use new zone.js entry-points (#40823)
In CLI version 12, the old style of imports is no longer supported.

PR Close #40823
2021-02-24 07:58:29 -08:00
George Kalpakas
9746751603 build(zone.js): use npm_package.pack to build the Zone.js package (#40592)
Previously, we could not use `npm_package.pack` for building the Zone.js
package due to a bug in Windows. This bug has been fixed in version
2.3.0 of `bazelbuild/rules_nodejs`.

Now that we have updated `bazelbuild/rules_nodejs` to version 2.3.3
(in #40581) we can replace `npm pack` with `npm_package.pack`.

PR Close #40592
2021-01-28 09:01:57 -08:00
George Kalpakas
6724b9e755 build(zone.js): do not error when build zone.js on Windows (#40557)
In older versions of `bazelbuild/rules_nodejs`, the `npm_package.pack`
rule does not work on Windows. This has been fixed in
bazelbuild/rules_nodejs#2257, but the fix is not available before
[version 2.3.0][1].

Currently, we use version 2.2.0 (see [WORKSPACE][2]). In order to allow
the `zone-js-builder.js` script to work on Windows, this commit switches
to using `npm pack` directly, intead of relying on `npm_package.pack`.

For reference, the version of `bazelbuild/rules_nodejs` was updated to
2.3.2 in PR #39636, but this was later reverted due to CI flakes
(4e6d69cc85).

[1]: https://github.com/bazelbuild/rules_nodejs/releases/tag/2.3.0
[2]: fc64fa8e1a/WORKSPACE (L12)

PR Close #40557
2021-01-26 10:51:15 -08:00
Joey Perrott
49dcb06dca build: remove pre-check script from publish scripts as it no longer performs its check (#40422)
Previously the pre-check confirmed that the stamping value was normal and expected, however
with the new stamping methodology of marking for publish via flag, the check no longer will
ever see anything but a passing version, since it is stamped as publish.

PR Close #40422
2021-01-13 14:42:59 -08:00
George Kalpakas
9057a0cc0b build: use the latest versions of Chrome (v87) and Firefox (v84) in tests (#40150)
This commit updates the versions of Chrome and Firefox used in tests -
both with Bazel and without (via Puppeteer) - to the latest:
- Chrome v87
- Firefox v84

PR Close #40150
2020-12-21 14:15:31 -08:00