Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Oct 22, 2019

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.

@gkalpak gkalpak added area: build & ci Related the build and CI infrastructure of the project state: WIP target: patch This PR is targeted for the next patch release and removed cla: yes labels Oct 22, 2019
@googlebot
Copy link

☹️ Sorry, but only Googlers may change the label cla: yes.

@ngbot ngbot bot modified the milestone: needsTriage Oct 22, 2019
@gkalpak gkalpak force-pushed the ci-publish-artifacts branch 2 times, most recently from fd27727 to c6eefde Compare October 22, 2019 14:47
@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Oct 22, 2019
@gkalpak gkalpak marked this pull request as ready for review October 22, 2019 14:48
@gkalpak gkalpak requested a review from a team as a code owner October 22, 2019 14:48
…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
Copy link
Member

@josephperrott josephperrott left a 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.

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.
Copy link
Member

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.

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@IgorMinar IgorMinar left a 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

@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 23, 2019
@AndrewKushnir AndrewKushnir removed the target: patch This PR is targeted for the next patch release label Oct 24, 2019
@AndrewKushnir AndrewKushnir added the target: major This PR is targeted for the next major release label Oct 24, 2019
AndrewKushnir pushed a commit that referenced this pull request Oct 24, 2019
…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
@AndrewKushnir
Copy link
Contributor

@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.

@gkalpak
Copy link
Member Author

gkalpak commented Oct 25, 2019

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.

gkalpak added a commit to gkalpak/angular that referenced this pull request Nov 11, 2019
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
gkalpak added a commit to gkalpak/angular that referenced this pull request Nov 11, 2019
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
gkalpak added a commit to gkalpak/angular that referenced this pull request Nov 11, 2019
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
gkalpak added a commit to gkalpak/angular that referenced this pull request Nov 11, 2019
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
@gkalpak gkalpak deleted the ci-publish-artifacts branch November 11, 2019 19:30
kara pushed a commit that referenced this pull request Nov 12, 2019
…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
kara pushed a commit that referenced this pull request Nov 12, 2019
…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
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants