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

Generate a built plugin for PRs, develop, and master branch #4766

Closed
pierlon opened this issue May 25, 2020 · 11 comments · Fixed by #4769
Closed

Generate a built plugin for PRs, develop, and master branch #4766

pierlon opened this issue May 25, 2020 · 11 comments · Fixed by #4769
Assignees
Labels
Infrastructure Changes impacting testing infrastructure or build tooling
Milestone

Comments

@pierlon
Copy link
Contributor

pierlon commented May 25, 2020

Feature description

It would be nice if we could have a generated build for the develop and master branches, along with PRs. That would allow for easier testing of changes, and should enhance the QA process.

@schlessera
Copy link
Collaborator

As a side effect of #4761, I'm already building a release ZIP for each PR and commit.

Once that PR is merged, you'll have access to these artifacts for 90 days per commit.

I'm also looking into surfacing it via an updating comment on the corresponding PR right now.

@schlessera
Copy link
Collaborator

For the develop and master branches, where could we best surface the links? Just post them to #amp-plugin-git on Slack?

@pierlon
Copy link
Contributor Author

pierlon commented May 25, 2020

The GitHub actions I've been working on stores the built plugin as an artifact and also in the repository's wiki, which Site Kit also does, for example.

That allows us to craft a URL to the plugin build with only the branch name or PR number given, and requires no call to the GitHub API. That cannot be said for the build artifact for the Action workflow, however. Multiple API calls will be needed, and with the request limit being 60 per minute, I don't see that as a viable option.

Storing the plugin build in the wiki would be an enhancement to your Action workflow, I suppose.

@schlessera
Copy link
Collaborator

Sounds good.

I don't know what state your workflow is in. Should we consolidate what we both have worked on right away, or should I just have my current version merged and you'll adapt as needed?

@pierlon
Copy link
Contributor Author

pierlon commented May 25, 2020

The latter sounds like a better option. The only thing I see missing from yours is generating a production build of the plugin and deploying the built zips to the wiki. I can add both of those things if you create a separate PR with your action.

@schlessera
Copy link
Collaborator

My PR is all but ready, it just requires a token to be added as a secret (I don't have access to the repo settings).

I guess it can be merged pretty quickly, so no need for a separate PR, unless @westonruter sees a major issue with the approach.

@schlessera
Copy link
Collaborator

Hmm, given that the test site is not properly populated, a separate PR is probably better anyway. I'll split them up.

@westonruter
Copy link
Member

Storing the plugin build in the wiki would be an enhancement to your Action workflow, I suppose.

This still makes me feel somewhat uncomfortable, storing ZIPs in the wiki. That just feels like abuse or at least a hack.

As an alternative to this, could we create a special “Pre-release” release where the ZIPs are uploaded to as assets? This would give them predictable filenames, for example if the tag is branches then the URL for a update/foo branch could perhaps be https://github.com/ampproject/amp-wp/releases/download/branches/update-foo.zip.

Granted, this is not ideal either because the release tag would be irrelevant.

Actually, if we're just jumping over hoops to find a place to store these ZIP files, why not just upload them to amp-wp.org? Or otherwise they could be uploaded to Google Cloud Storage?

@westonruter
Copy link
Member

westonruter commented May 27, 2020

In other words, Git is not really meant for storing binary files. The size of the Wiki repo is just going to balloon as more and more ZIP objects are added to its history, each new push to a PR resulting in a Wiki commit adding another 1+ megabytes to the repo size.

@amedina
Copy link
Member

amedina commented May 27, 2020 via email

@pierlon
Copy link
Contributor Author

pierlon commented May 28, 2020

It is a bit of a hack indeed. For Site Kit, they've automated removing the assets stored in the wiki once the PR has closed.

Actually, if we're just jumping over hoops to find a place to store these ZIP files, why not just upload them to amp-wp.org? Or otherwise they could be uploaded to Google Cloud Storage?

That sounds like a much better solution. If it is possible it would be more than welcome.

@pierlon pierlon self-assigned this Jun 3, 2020
@westonruter westonruter added this to the v1.5.4 milestone Jun 10, 2020
@pierlon pierlon added the Infrastructure Changes impacting testing infrastructure or build tooling label Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Changes impacting testing infrastructure or build tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants