New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: publish tarballs for all Angular packages as build artifacts on PR builds #33321
Conversation
|
fd27727
to
c6eefde
Compare
8cb08d1
to
9d445c9
Compare
…R builds Previously, when one wanted to try out the changes from a PR before it was merged, they had to check out the PR locally and build the Angular packages themselves (which is time-consuming and wasteful given that the packages have already been built on CI). This commit persists all Angular packages on each build as `.tgz` files, which can be used to install dependencies on an project (supported by both [npm][1] and [yarn][2]). In addition to individual `.tgz` files for each package, a `.tgz` file including all packages is also stored, which can be used to test the packages locally by overwriting the ones in the `node_modules/` directory of a project. CircleCI [build artifacts][3] an be used for longer-term storage of the outputs of a build and are designed to be useful around the time of the build, which suits our needs. [1]: https://docs.npmjs.com/cli/install.html [2]: https://yarnpkg.com/lang/en/docs/cli/add [3]: https://circleci.com/docs/2.0/artifacts
9d445c9
to
450a084
Compare
450a084
to
9b7c0de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, we will need to have @IgorMinar review the docs/DEVELOPER.md
change as well.
docs/DEVELOPER.md
Outdated
Rather than requiring them to pull your Pull Request and build Angular locally, you can | ||
publish the `*-builds` snapshots just like our CircleCI build does. | ||
Rather than requiring them to pull your Pull Request and build Angular locally, you can publish | ||
snapshots of the Angular packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a few locations in this doc, the phrase "you can publish" is used. I am worried that it sounds like an action that the user needs to take rather than something that will happen for them.
Should we say something like:
Rather than requiring them to pull your Pull Request and build Angular locally, they can depend on snapshots of the Angular packages created for the Pull Request by each CI run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. (This is actually the only occurrence where the phrase is inaccurate (in other places they do indeed need to take an action) 😁)
Given that the snapshots are not published by CI in all methods described below, I changed it to:
Rather than requiring them to pull your Pull Request and build Angular locally, they can depend on snapshots of the Angular packages created based on the code in the Pull Request.
I also updated the Publishing to GitHub repos section to make it clear that they need to have built the packages locally first.
@@ -0,0 +1,29 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a bit more logging, expressing when the all packages tarball is created and when things start and complete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow. this is awesome! thanks
…R builds (#33321) Previously, when one wanted to try out the changes from a PR before it was merged, they had to check out the PR locally and build the Angular packages themselves (which is time-consuming and wasteful given that the packages have already been built on CI). This commit persists all Angular packages on each build as `.tgz` files, which can be used to install dependencies on an project (supported by both [npm][1] and [yarn][2]). In addition to individual `.tgz` files for each package, a `.tgz` file including all packages is also stored, which can be used to test the packages locally by overwriting the ones in the `node_modules/` directory of a project. CircleCI [build artifacts][3] an be used for longer-term storage of the outputs of a build and are designed to be useful around the time of the build, which suits our needs. [1]: https://docs.npmjs.com/cli/install.html [2]: https://yarnpkg.com/lang/en/docs/cli/add [3]: https://circleci.com/docs/2.0/artifacts PR Close #33321
@gkalpak there was a conflict merging this PR to patch branch, so I merged it to master. Could you please create a followup PR targeting patch branch with the necessary changes? Thank you. |
Thx, @AndrewKushnir! The CircleCI config seems to have deviated quite a bit on the patch branch. Thus, I don't think this is worth backporting. Let's keep it as master-only. |
Since angular#33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes angular#33686
Since angular#33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes angular#33686
Since angular#33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes angular#33686
Since angular#33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes angular#33686
…33733) Since #33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes #33686 PR Close #33733
…33733) Since #33321, Angular packages have been persisted on each build as CircleCI build artifacts (`.tgz` files), which can be used to install dependencies on a project (for the purpose of testing or trying out a change before a PR being merged and without having to build the packages from source locally). Previously, only packages published to npm under the `@angular` scope were persisted as build artifacts. This commit adds the `zone.js` package to the list of persisted packages. Fixes #33686 PR Close #33733
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. |
Previously, when one wanted to try out the changes from a PR before it was merged, they had to check out the PR locally and build the Angular packages themselves (which is time-consuming and wasteful given that the packages have already been built on CI).
This commit persists all Angular packages on each build as
.tgz
files, which can be used to install dependencies on an project (supported by both npm and yarn).CircleCI build artifacts an be used for longer-term storage of the outputs of a build and are designed to be useful around the time of the build, which suits our needs.