Commit graph

383 commits

Author SHA1 Message Date
Joey Perrott
ade024407d fix(docs-infra): remove part aio infra (#54929)
Remove parts of the aio infra

PR Close #54929
2024-04-02 18:38:04 +00:00
Paul Gschwendtner
adf3ee8fea ci: fix build failures in patch branch (#55064)
This commit fixes various issues that seem to cause the 17.3.x patch
to be red for weeks:

- Eslint checking a file for aio/tools that is not part of a tsconfig—
  hence an error is being reported.

- Audit-web-app importing some Lighthouse APIs that aren't available
  under the given path.

PR Close #55064
2024-03-27 11:58:45 +00:00
Alan Agius
4842eedd7e fix(docs-infra): do not delete BUILD.bazel in help directory during updates (#54697)
In https://github.com/angular/angular/pull/54591, a `BUILD.bazel` file was created in `aio/content/cli/help/BUILD.bazel`, this however breaks the automatic CLI help pages updates as prior to this change, the `help` directory was being deleted. See: 17346e89da

This commit, updates the process to delete only the JSON files and copying the new files.

PR Close #54697
2024-03-06 10:18:03 +01:00
Paul Gschwendtner
4851453735 ci: add debug information for failing firebase deploy (#54275)
Adding debug information for failing firebase deploy, hoping
to yield information about the missing resource. The next
multi-site seems to be failing, but is available.

PR Close #54275
2024-02-06 15:23:13 +00:00
Andrew Kushnir
9bf64954a9 ci: update expected score for one of the AIO tests (#52116)
This commit updates the score for one of the AIO tests. The problem is pre-existing (there is nothing in this PR that might cause the problem) and this change just brings the CI back to the "green" state.

PR Close #52116
2023-10-10 11:23:44 -07:00
Joey Perrott
ba64e9c247 docs: update to latest version of material (#51785)
Update to the latest version of material

PR Close #51785
2023-09-19 18:39:10 +02:00
Joey Perrott
cfcd2e3aeb refactor(docs-infra): correct incomplete string replacement (#51585)
Find all usages of `\n` and replace them instead of just the first.

PR Close #51585
2023-08-31 16:35:51 +00:00
Joey Perrott
2a2b61b1ed ci: migrate monitoring jobs to GHA (#51350)
Migrate monitoring jobs to Github Actions from CircleCI

PR Close #51350
2023-08-30 19:41:53 +00:00
Matthieu Riegler
5fb5f087e3 docs(docs-infra): fix docs-watch script (#51316)
With this commit we can use `yarn docs-watch` again
Fixes #51308

PR Close #51316
2023-08-17 10:17:33 -07:00
Joey Perrott
12dbe1a6cf ci: migrate aio jobs to GHA (#51071)
Migrate aio presubmit and deploy jobs to use Github Actions

PR Close #51071
2023-08-14 08:55:30 -07:00
Angular Robot
528fea7da1 build: update cross-repo angular dependencies (#51127)
See associated pull request for more information.

PR Close #51127
2023-07-21 14:12:58 +00:00
Matthieu Riegler
288f2c8468 refactor(docs-infra): cleanup deprecated code (#49671)
This commit replaces (non material-related) deprecated code present in the aio app.

* `pageYOffset` can be replaced by `scrollY`
*  RxJs' `mapTo()` is just a `map()`
* `createNgModuleRef` can be replaced by `createNgModule`
* HttpEmits `ProgressEvent` not `ErrorEvent`  (see #34748)
* `SwUpdate.available` is replaced by  `versionUpdates` with a `filter`
* `SwUpdate.activated` is replaced by the returned promised of `SwUpdate.activateUpdate`.

PR Close #49671
2023-04-17 14:04:26 +00:00
Paul Gschwendtner
42619bd670 build: remove puppeteer, remaining usages of webdriver-manager and migrate AIO production test to Bazel (#49025)
This commit does three things that all related and required to get
rid of `webdriver-manager`:

* Our puppeteer protractor setup in AIO relies on webdriver-manager
because we install a corresponding chromedriver based on the puppeteer
chromium version. We would like to get rid of this brittle setup.

* We don't use `puppeteer` in many places because we manage chromium and
the driver through Bazel. This commit removes the remaining puppeteer
usage and replaces it with the Bazel-managed canonical browser

* We need to migrate the AIO production URL tests to Bazel. These
weren't part of Aspect's migration. This is needed so that we can drop
puppeteer and use the Bazel browser setup.

* Migrates some at-runtime TS `ts-node` test setup to proper idiomatic
Bazel code. Needed because it depends on code that also had to be
migrated to Bazel given the production e2e test Bazel migration (above
points).

Note: The xregexp dependency had to be added to the root project because
`ts_library` does not support compilation deps from `@aio_npm`. This is
something we will fix anyway when we have a more modern toolchain!

PR Close #49025
2023-02-10 19:22:18 +00:00
Paul Gschwendtner
1898190c28 build: update ng-dev and account for stamping changes (#48731)
* updates ng-dev and build-tooling since the previous SHAs are
no longer existent after the CircleCI incident snapshot build removal.
* accounts for the new stamping variables.

PR Close #48731
2023-01-13 14:10:39 +00:00
Paul Gschwendtner
d4a56721a4 ci: use readonly github token for querying CLI snapshot repo (#48681)
Currently the Github action-triggered code uses the `GITHUB_TOKEN`
for querying the CLI snapshot builds repository. This does not work
because the Github actions token is scoped to the orginating
repository, even for queries to a read public repository.

We fix this by using a personal access token. The token is
readonly and only exists to avoid potential rate limiting.

PR Close #48681
2023-01-10 11:13:34 -08:00
Alan Agius
2dc31576ab ci: add Angular CLI help pages action (#48577)
This commits adds an action to update the Angular CLI help contents that are used by AIO to generate CLI guides.

This also changes the setup to include the files are source files instead of having to clone the repository each time. This also simplifies the PR review process of the PR opened by the action.

PR Close #48577
2023-01-10 08:01:38 -08:00
Derek Cormier
0ae80a78a3 build(bazel): improve remote caching for AIO local deps build (#48579)
Fix non-hermetic zipping of example zips by fixing the zip entry timestamps.

I also hardcoded stamp values in stable-status.txt and volatile-status.txt using the workspace status command for the aio_local_deps config to improve cache performance. The Bazel remote cache appears to not ignore volatile-status.txt when there are no other changes, unlike the local Bazel cache:

https://github.com/bazelbuild/bazel/issues/10075#issuecomment-546872111

PR Close #48579
2023-01-02 12:16:12 +00:00
Paul Gschwendtner
90c2088679 build: make devmode a noop and ensure it never runs (#48521)
This is basically a pre-step for combining devmode and prodmode into a
single compilation. We are already achieving this now, and can claim
with confidence that we reduced possible actions by half. This is
especially important now that prodmode is used more often, but rules
potentially still using the devmode ESM sources. We can avoid double
compilations (which existed before the whole ESM migration too!).

We will measure this more when we have more concrete documentation
of the changes & a better planning document.

Changes:

  * ts_library will no longer generate devmode `d.ts`. Definitions are
    generated as part of prodmode. That way only prodmode can be exposed
    via providers.
  * applied the same to `ng_module`.
  * updates migrations to bundle because *everything* using `ts_library`
    is now ESM. This is actually also useful in the future if
    schematics rely on e.g. the compiler.
  * updates schematics for localize to also bundle. similar reason as
    above.

PR Close #48521
2022-12-19 19:50:45 +00:00
Paul Gschwendtner
13d3039c7d refactor: convert AIO tooling scripts used in Bazel to ESM (#48521)
Since the Bazel setup in this repo will now always use ESM,
the tooling scripts/binaries in AIO need to be switched to ESM
too. Most of the scripts are already ESM, but a few had to be converted.

Note that the Dgeni generation does not use ESM because it's unaffected
and the Dgeni CLI is used. In the future we could also update the Dgeni
setup to ESM but there is no need currently.

PR Close #48521
2022-12-19 19:50:44 +00:00
Paul Gschwendtner
6b16df1954 build: remove docker-based AIO preview deploy setup (#48345)
The docker-based AIO preview deploy setup is replaced with
significantly simpler setup using GitHub actions provided by
dev-infra (also something dev-infra can maintain better then).

The actions under the hood leverage Firebase preview channels.

PR Close #48345
2022-12-05 14:52:37 -08:00
Paul Gschwendtner
eb43ed25eb build: do not use --config=release when building AIO for development (#48329)
When building AIO using `yarn build` the `--config=release` is added.
This was done as part of the Bazel migration to make sure the footer
shows a Git revision via Bazel stamping.

This does not provide enough benefits, compared to the downside of
reduced caching. Bazel will discard the analysis cache when the stamp
configuration changes.

This may happen easily when you work in framework where
`--config=release` is not used. Then when starting work in AIO: the
config changes and the cache is discarded. This may even mean that
existing framework package build artifacts may be discarded when an
AIO local build is started.

Co-authored-by: Joey Perrott <josephperrott@gmail.com>

PR Close #48329
2022-12-02 09:47:42 -08:00
Derek Cormier
535838d67b build(bazel): fix aio deploy script (#48265)
Move the copy of the bazel dist folder to the firebase dist folder
earlier on in the process so that any checks operate out of a single
folder.

PR Close #48265
2022-11-29 20:04:24 +00:00
Derek Cormier
b258b32f55 build(bazel): copy dist folder to aio for firebase deployment
Firebase requires the distributable to be in the same folder as
firebase.json.
2022-11-23 14:43:08 -07:00
Derek Cormier
2e38af1f48 build(bazel): fix aio deployment unit tests
Missing a spy for the new chmod call.
2022-11-23 12:39:23 -07:00
Derek Cormier
776882ae7e build(bazel): remove write protection on aio dist folder for deployment
Deploy script adds extra files and needs write access.
2022-11-23 12:09:51 -07:00
Derek Cormier
6360e38d07 build(bazel): fix AIO deployment unit tests (#48206)
Forgot to update the dist path in these tests.

PR Close #48206
2022-11-23 18:30:44 +00:00
Derek Cormier
10f1e0fb3f build(bazel): fix dist dir in AIO deploy script (#48203)
The script is run cd'ed into aio so the path to the Bazel dist
location is up one folder.

PR Close #48203
2022-11-23 17:40:25 +00:00
Derek Cormier
6948f0f0f3 build(bazel): fix AIO deployment script (#48188)
Don't run the script under Bazel, except for the tests. Configure a
Bazel flag to select the AIO build configuration.

PR Close #48188
2022-11-23 14:00:03 +00:00
Derek Cormier
28079b9364 build(bazel): fix yarn call in aio deploy script (#48185)
Incorrectly calls yarn scripts from the root package.

PR Close #48185
2022-11-22 22:53:30 +00:00
Derek Cormier
903917b13d build(bazel): remaining AIO Bazel migration fixes 2022-11-22 13:51:16 -07:00
Derek Cormier
a81d6d5da0 build(bazel): add missing dependency to deploy script
Cannot load the root package.json. Surfaced after trying to merge
aio-bazel-migration to main because the deployment short circuits
on ci for feature branhces.
2022-11-22 13:51:16 -07:00
Derek Cormier
6cc3256018 build(bazel): fix linking of local angular packages
Npm angular deps were transitively being included, confusing the
rules_nodejs linker.
2022-11-22 13:51:16 -07:00
Derek Cormier
320f521a8c build(bazel): fix regressions for docs-watch
Some earlier refactoring prevented the watchr script from running in
the source tree. There was also a Windows issue where running architect
didn't preserve symlinks causing the app to not be served.
2022-11-22 13:51:16 -07:00
Derek Cormier
a61397f2f8 build(bazel): consolidate windows chromium path workaround
Add the hack to a central location so that it's easier to fix later.
2022-11-22 13:51:16 -07:00
Derek Cormier
92d18bbac0 build(bazel): use workspace status command for AIO version stamping
Fixes a bug where the navigation map did not have the correct SHAs.
2022-11-22 13:51:16 -07:00
Derek Cormier
e4b82cea26 build(bazel): clean up pathing in aio build tooling
Make use of process.env.RUNFILES.
2022-11-22 13:51:16 -07:00
Derek Cormier
ffea372105 build(bazel): update documentation for docs authors
Where possible, preseve the original yarn commands.
2022-11-22 13:51:16 -07:00
Derek Cormier
c777fa7e22 build(bazel): fix a11y and pwa tests on Windows
Needed to use absoulte paths and fix a separator.
2022-11-22 13:51:16 -07:00
Derek Cormier
b6d80fb564 build(bazel): fix a bug where the opensearch url coudln't be substituted
The file was write protected in the bazel output tree.
2022-11-22 13:51:16 -07:00
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
Derek Cormier
7bcefdcc63 build(bazel): selectively enable network access for some aio targets
By default network access is disabled for actions on ci.
2022-11-22 13:51:16 -07:00
Derek Cormier
19397c2214 build(bazel): fix some regressions
Caused by some incompatible changes that were merged in.
2022-11-22 13:51:16 -07:00
Derek Cormier
b4c40c5d55 build(bazel): merge aio/tools/defaults.bzl and tools/defaults.bzl
Detect the correct workspace for the source maps dep.
2022-11-22 13:51:16 -07:00
Derek Cormier
3dba677763 build(bazel): adjust aio opensearch substitution with bazel paths
Now points to the bazel dist folder.
2022-11-22 13:51:16 -07:00
Derek Cormier
1aeb8aa85c build(bazel): run firebase deployment tests under bazel
The deployment is still run from a yarn script.
2022-11-22 13:51:16 -07:00
Derek Cormier
e1cc2e14b4 build(bazel): test aio pwa score under bazel
Refactored the a11y score tests to share the pattern of running an http
server alongside a test script.
2022-11-22 13:51:16 -07:00
Derek Cormier
9752d2d72b build(bazel): run aio a11y tests under bazel
Wrap existsing scripts under bazel and write a new script
to spin up an http server on an unused port.
2022-11-22 13:51:16 -07:00
Derek Cormier
d9f90b55f6 build(bazel): build aio 404 page under bazel
The legacy build injected this file into the dist folder, however that's
not possible under bazel so files are copied to a new directory.
2022-11-22 13:51:16 -07:00
Derek Cormier
07126ae40f build(bazel): fix race conditions in windows aio build
Disables the rules_nodejs linker and adds a custom esm module resolver
2022-11-22 13:51:16 -07:00
Derek Cormier
2daf369ec8 build(bazel): add an aio fast serve target
This is equivalent to docs-watch in the legacy build.
2022-11-22 13:51:16 -07:00