Conversation
This commit switches the `deploy-to-firebase.sh` script, that we use for
deploying angular.io to production, from Bash to JavaScript. This makes
the script easier to maintain.
For the same reasons, it also switches the `deploy-to-firebase.test.sh`
script, that we use for testing the `deploy-to-firebase` script, from
Bash to JavaScript (using jasmine as the test runner).
Finally, this commit also updates ShellJS to the latest version to get
better error messages (including the actual error) when `exec()` fails.
NOTE: Before switching the test script to JS, I verified that the new
`deploy-to-firebase.js` script passed the tests with the old
`deploy-to-firebase.test.sh` script.
|
You can preview 9caf354 at https://pr39470-9caf354.ngbuilds.io/. |
Previously, the `deploy-to-firebase.js` script and the accompanying `deploy-to-firebase.spec.js` spec file were using the `origin` remote alias in certain commands. This works fine on CI, where `origin` points to the `angular/angular` GitHub repo, but might not work locally. This commit ensures that the correct remote is used by explicitly specifying it by the URL, thus ensuring that the tests will behave identically on CI and locally.
9caf354 to
82e0458
Compare
|
You can preview 82e0458 at https://pr39470-82e0458.ngbuilds.io/. |
82e0458 to
5dd1280
Compare
|
You can preview 5dd1280 at https://pr39470-5dd1280.ngbuilds.io/. |
|
You can preview d102032 at https://pr39470-d102032.ngbuilds.io/. |
petebacondarwin
left a comment
There was a problem hiding this comment.
LGTM - a handful of NITs - nothing blocking.
The 3rd commit message has some typos mentioned offline.
There was a problem hiding this comment.
NIT - I would change $darkColor to something like $accentColor, since it is not always dark! See the archive mode for an example.
There was a problem hiding this comment.
Good point. I was between $darkColor and $gradientTargetColor (since that is what it is used currently). I'll go with the latter.
There was a problem hiding this comment.
Would it be worth keeping the dry-run feature in case you just wanted to try out running the script locally? Or is this never going to be needed?
There was a problem hiding this comment.
I've never needed to dry-run it locally, but happy to keep the option.
d102032 to
e482702
Compare
…oyment mode themes Different deployment modes (such as `archive` and `next`) are identified by the different colors used in prominent elements of the page, such as the topbar and the footer. Previously, the necessary styles for creating such a deployment mode "theme" were duplicated for each mode. This commit simplifies the creation/modification of a deployment mode theme by introducing a Sass mixin that generates the necessary styles (when provided with necessary theme colors).
…of deployment mode themes
…-candidates This commit adds a new build configuration/deployment mode (`rc`) for deploying release-candidate versions to angular.io. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in angular#39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU
…oyment mode themes (#39470) Different deployment modes (such as `archive` and `next`) are identified by the different colors used in prominent elements of the page, such as the topbar and the footer. Previously, the necessary styles for creating such a deployment mode "theme" were duplicated for each mode. This commit simplifies the creation/modification of a deployment mode theme by introducing a Sass mixin that generates the necessary styles (when provided with necessary theme colors). PR Close #39470
…-candidates (#39470) This commit adds a new build configuration/deployment mode (`rc`) for deploying release-candidate versions to angular.io. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in #39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
#39470) This commit updates the angular.io deployment script (`deploy-to-firebase.js`) to support deploying release-candidate versions. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in #39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
…nctions (#39470) This commit breaks up the code in `deploy-to-firebase.js` script, that we use for deploying angular.io to production, to smaller functions (instead of a monolithic block). This makes the script easier to maintain and also makes testing individual operations easier. The commit also updates the `deploy-to-firebase.spec.js` spec file to take advantage of the standalone functions to speed up testing by calling the corresponding function instead of having to spawn a new process and run the `deploy-to-firebase.js` script with the `--dry-run` flag. NOTE: Before updating the tests, I verified that the updated `deploy-to-firebase.js` script passed the old tests. PR Close #39470
Previously, the documentation for each major Angular version was hosted on each own Firebase project. This required creating a new project for each major release and increased the administrative/maintenance cost. Now that Firebase supports hosting [multiple websites][1] as part of the same project, we are switching to deploying all major versions to sites created on `angular-io` project. This is part of the work needed to prepare angular.io for our [new versioning/branching process][2] (also tracked in #39366). [1]: https://firebase.google.com/docs/hosting/multisites [2]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
This commit upgrades `firebase-tools` (used to deploy angular.io to Firebase hosting) to the latest version. This gives us access to the latest fixes/improvements and also new features, such as [version cloning][1]. [1]: https://firebase.google.com/docs/hosting/manage-hosting-resources#cli-commands-cloning PR Close #39470
) Previously, the `deploy-to-firebase.js` script and the accompanying `deploy-to-firebase.spec.js` spec file were using the `origin` remote alias in certain commands. This works fine on CI, where `origin` points to the `angular/angular` GitHub repo, but might not work locally. This commit ensures that the correct remote is used by explicitly specifying it by the URL, thus ensuring that the tests will behave identically on CI and locally. PR Close #39470
…oyment mode themes (#39470) Different deployment modes (such as `archive` and `next`) are identified by the different colors used in prominent elements of the page, such as the topbar and the footer. Previously, the necessary styles for creating such a deployment mode "theme" were duplicated for each mode. This commit simplifies the creation/modification of a deployment mode theme by introducing a Sass mixin that generates the necessary styles (when provided with necessary theme colors). PR Close #39470
…-candidates (#39470) This commit adds a new build configuration/deployment mode (`rc`) for deploying release-candidate versions to angular.io. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in #39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
#39470) This commit updates the angular.io deployment script (`deploy-to-firebase.js`) to support deploying release-candidate versions. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in #39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
…nctions (#39470) This commit breaks up the code in `deploy-to-firebase.js` script, that we use for deploying angular.io to production, to smaller functions (instead of a monolithic block). This makes the script easier to maintain and also makes testing individual operations easier. The commit also updates the `deploy-to-firebase.spec.js` spec file to take advantage of the standalone functions to speed up testing by calling the corresponding function instead of having to spawn a new process and run the `deploy-to-firebase.js` script with the `--dry-run` flag. NOTE: Before updating the tests, I verified that the updated `deploy-to-firebase.js` script passed the old tests. PR Close #39470
Previously, the documentation for each major Angular version was hosted on each own Firebase project. This required creating a new project for each major release and increased the administrative/maintenance cost. Now that Firebase supports hosting [multiple websites][1] as part of the same project, we are switching to deploying all major versions to sites created on `angular-io` project. This is part of the work needed to prepare angular.io for our [new versioning/branching process][2] (also tracked in #39366). [1]: https://firebase.google.com/docs/hosting/multisites [2]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
This commit upgrades `firebase-tools` (used to deploy angular.io to Firebase hosting) to the latest version. This gives us access to the latest fixes/improvements and also new features, such as [version cloning][1]. [1]: https://firebase.google.com/docs/hosting/manage-hosting-resources#cli-commands-cloning PR Close #39470
This commit switches the `deploy-to-firebase.sh` script, that we use for
deploying angular.io to production, from Bash to JavaScript. This makes
the script easier to maintain.
For the same reasons, it also switches the `deploy-to-firebase.test.sh`
script, that we use for testing the `deploy-to-firebase` script, from
Bash to JavaScript (using jasmine as the test runner).
Finally, this commit also updates ShellJS to the latest version to get
better error messages (including the actual error) when `exec()` fails.
NOTE: Before switching the test script to JS, I verified that the new
`deploy-to-firebase.js` script passed the tests with the old
`deploy-to-firebase.test.sh` script.
PR Close #39470
) Previously, the `deploy-to-firebase.js` script and the accompanying `deploy-to-firebase.spec.js` spec file were using the `origin` remote alias in certain commands. This works fine on CI, where `origin` points to the `angular/angular` GitHub repo, but might not work locally. This commit ensures that the correct remote is used by explicitly specifying it by the URL, thus ensuring that the tests will behave identically on CI and locally. PR Close #39470
…oyment mode themes (#39470) Different deployment modes (such as `archive` and `next`) are identified by the different colors used in prominent elements of the page, such as the topbar and the footer. Previously, the necessary styles for creating such a deployment mode "theme" were duplicated for each mode. This commit simplifies the creation/modification of a deployment mode theme by introducing a Sass mixin that generates the necessary styles (when provided with necessary theme colors). PR Close #39470
…-candidates (#39470) This commit adds a new build configuration/deployment mode (`rc`) for deploying release-candidate versions to angular.io. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in #39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
#39470) This commit updates the angular.io deployment script (`deploy-to-firebase.js`) to support deploying release-candidate versions. This is part of the work needed to prepare angular.io for our [new versioning/branching process][1] (also tracked in #39366). [1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
…nctions (#39470) This commit breaks up the code in `deploy-to-firebase.js` script, that we use for deploying angular.io to production, to smaller functions (instead of a monolithic block). This makes the script easier to maintain and also makes testing individual operations easier. The commit also updates the `deploy-to-firebase.spec.js` spec file to take advantage of the standalone functions to speed up testing by calling the corresponding function instead of having to spawn a new process and run the `deploy-to-firebase.js` script with the `--dry-run` flag. NOTE: Before updating the tests, I verified that the updated `deploy-to-firebase.js` script passed the old tests. PR Close #39470
Previously, the documentation for each major Angular version was hosted on each own Firebase project. This required creating a new project for each major release and increased the administrative/maintenance cost. Now that Firebase supports hosting [multiple websites][1] as part of the same project, we are switching to deploying all major versions to sites created on `angular-io` project. This is part of the work needed to prepare angular.io for our [new versioning/branching process][2] (also tracked in #39366). [1]: https://firebase.google.com/docs/hosting/multisites [2]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU PR Close #39470
This commit upgrades `firebase-tools` (used to deploy angular.io to Firebase hosting) to the latest version. This gives us access to the latest fixes/improvements and also new features, such as [version cloning][1]. [1]: https://firebase.google.com/docs/hosting/manage-hosting-resources#cli-commands-cloning PR Close #39470
In angular#39470, the `deploy-to-firebase.sh` script (used to deploy AIO to Firebase when building an upstream branch), was replaced by an equivalent JS script. In this new `deploy-to-firebase.js` script, we were overly aggressive with suppressing command output, which made it hard to investigate failures ([example failing CI job][1]). This commit updates the `deploy-to-firebase.js` script to capture command output as usual in the CI job logs. This makes the output similar to the one generated by the old [deploy-to-firebase.sh][2] script ([example CI logs][3]). One concern with capturing command output is having the value of a secret environment variables leaked in the logs. This is not the case here, since: 1. The secret env vars are not printed from the commands that use them. 2. CircleCI will [mask the values of secret env vars][4] in the output. As an extra precaution (although not strictly necessary), we run `yarn` with the `--silent` option, which avoid echoing the executed yarn commands. [1]: https://circleci.com/gh/angular/angular/849310 [2]: https://github.com/angular/angular/blob/3b0b7d22109c79b4dceb/aio/scripts/deploy-to-firebase.sh [3]: https://circleci.com/gh/angular/angular/848109 [4]: https://circleci.com/docs/2.0/env-vars/#secrets-masking
In #39470, the `deploy-to-firebase.sh` script (used to deploy AIO to Firebase when building an upstream branch), was replaced by an equivalent JS script. In this new `deploy-to-firebase.js` script, we were overly aggressive with suppressing command output, which made it hard to investigate failures ([example failing CI job][1]). This commit updates the `deploy-to-firebase.js` script to capture command output as usual in the CI job logs. This makes the output similar to the one generated by the old [deploy-to-firebase.sh][2] script ([example CI logs][3]). One concern with capturing command output is having the value of a secret environment variables leaked in the logs. This is not the case here, since: 1. The secret env vars are not printed from the commands that use them. 2. CircleCI will [mask the values of secret env vars][4] in the output. As an extra precaution (although not strictly necessary), we run `yarn` with the `--silent` option, which avoid echoing the executed yarn commands. [1]: https://circleci.com/gh/angular/angular/849310 [2]: https://github.com/angular/angular/blob/3b0b7d22109c79b4dceb/aio/scripts/deploy-to-firebase.sh [3]: https://circleci.com/gh/angular/angular/848109 [4]: https://circleci.com/docs/2.0/env-vars/#secrets-masking PR Close #39596
In #39470, the `deploy-to-firebase.sh` script (used to deploy AIO to Firebase when building an upstream branch), was replaced by an equivalent JS script. In this new `deploy-to-firebase.js` script, we were overly aggressive with suppressing command output, which made it hard to investigate failures ([example failing CI job][1]). This commit updates the `deploy-to-firebase.js` script to capture command output as usual in the CI job logs. This makes the output similar to the one generated by the old [deploy-to-firebase.sh][2] script ([example CI logs][3]). One concern with capturing command output is having the value of a secret environment variables leaked in the logs. This is not the case here, since: 1. The secret env vars are not printed from the commands that use them. 2. CircleCI will [mask the values of secret env vars][4] in the output. As an extra precaution (although not strictly necessary), we run `yarn` with the `--silent` option, which avoid echoing the executed yarn commands. [1]: https://circleci.com/gh/angular/angular/849310 [2]: https://github.com/angular/angular/blob/3b0b7d22109c79b4dceb/aio/scripts/deploy-to-firebase.sh [3]: https://circleci.com/gh/angular/angular/848109 [4]: https://circleci.com/docs/2.0/env-vars/#secrets-masking PR Close #39596
In #39470, the `deploy-to-firebase.sh` script (used to deploy AIO to Firebase when building an upstream branch), was replaced by an equivalent JS script. In this new `deploy-to-firebase.js` script, we were overly aggressive with suppressing command output, which made it hard to investigate failures ([example failing CI job][1]). This commit updates the `deploy-to-firebase.js` script to capture command output as usual in the CI job logs. This makes the output similar to the one generated by the old [deploy-to-firebase.sh][2] script ([example CI logs][3]). One concern with capturing command output is having the value of a secret environment variables leaked in the logs. This is not the case here, since: 1. The secret env vars are not printed from the commands that use them. 2. CircleCI will [mask the values of secret env vars][4] in the output. As an extra precaution (although not strictly necessary), we run `yarn` with the `--silent` option, which avoid echoing the executed yarn commands. [1]: https://circleci.com/gh/angular/angular/849310 [2]: https://github.com/angular/angular/blob/3b0b7d22109c79b4dceb/aio/scripts/deploy-to-firebase.sh [3]: https://circleci.com/gh/angular/angular/848109 [4]: https://circleci.com/docs/2.0/env-vars/#secrets-masking PR Close #39596
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR updates AIO deployments to match our new versioning/branching process (including deploying release-candidate versions to angular.io).
See individual commits for more info.
This is part of the work tracked in #39366.
This PR is based on #37280 (but includes extra changes/improvements).