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

Automate regular data releases #18

Closed
halostatue opened this issue Aug 15, 2018 · 9 comments
Closed

Automate regular data releases #18

halostatue opened this issue Aug 15, 2018 · 9 comments
Assignees
Labels

Comments

@halostatue
Copy link
Member

The release process is relatively fast, but it should be automated as much as possible.

The release process looks like this:

  1. Review any outstanding issues or pull requests to see if anything needs to be addressed. This is necessary because there is currently no automated source for extensions for the thousands of MIME entries. (Suggestions and/or pull requests for same would be deeply appreciated.)
  2. bundle install
  3. bundle exec rake mime:apache
  4. bundle exec rake mime:iana
  5. Review the changes to make sure that the changes are sane. The IANA data source changes from time to time, resulting in big changes or even a broken step 4. (The most recent change was the addition of the font/* top-level category.)
  6. bundle exec rake convert
  7. bundle exec rake update:version (This is new as of today.)
  8. Write up the changes in History.md. If any PRs have been merged, these should be noted specifically.
  9. Commit the changes and push to GitHub.
  10. bundle exec rake release VERSION=newversion.

Some thoughts on this:

  1. Any automation would have to go through a two stage process. The first stage would execute stages 3 and 4 because the JSON and column changes are noisier than the YAML changes. It would submit a pull request.
  2. On approval/merge of an automation-generated pull request, the automation could execute steps 6–10, adding summary information to the History.md about the particular release.
  3. A small change would have to be made suppressing Hoe.plugin :doofus for automation (but it should not be suppressed for human-based releases).

I think this needs to be done, but I have no time to implement such automation, nor am I running a server anywhere that could host it.

@halostatue
Copy link
Member Author

This might be able to be done with GitHub actions.

@halostatue
Copy link
Member Author

  • Issue and PR review will always be manual.

  • The following steps have been automated into a single rake task (rake release:automatic):

    • mime:apache
    • mime:iana convert
    • update:version
    • Write up the changes in History.md. (If any PRs have been merged, these should be noted specifically.)
    • Commit the changes and push to GitHub.

Still not sure how to push back to GitHub (I am sure there are actions that can do this), or to run this regularly (once a week?), or how to release to Rubygems. Once those are solved (more a problem of time or a PRs from interested parties), this can be fully automated.

I may modify the rake update:history task added to be able to detect and replace a NEXT / YYYY-MM-DD shape so that PRs can be merged with those updates and be released on the very next automatic release.

@halostatue
Copy link
Member Author

This has been mostly automated with #57; what remains is difficult to automate because of security requirements from RubyGems.

@segiddins
Copy link
Contributor

@halostatue it should now be easy to automate pushing to rubygems with https://github.com/rubygems/release-gem / trusted publishing

@halostatue
Copy link
Member Author

Thanks. I’m aware of it, but haven't had time to build out the required infrastructure and make it work with Hoe. See Contributing: Help Wanted.

@segiddins
Copy link
Contributor

I'll look at it next week! Just a heads up, you'd still need to configure trusted publishing on the rubygems.org end since I'm not a gem owner.

@halostatue
Copy link
Member Author

I have no problem with that; if we can get a publish trigger working to the point where it fails because of authorization, I can get it set up. It’s the workflow that I’ve had no time to deal with.

@halostatue
Copy link
Member Author

A couple of notes as I’m thinking of it:

  • The job that runs this will need contents: write permissions because Hoe creates tags as part of its publish process (git push will be required at the end, but that's easy).
  • I believe that I have hoe.doofus running, which basically asks a bunch of questions and waits for an enter key; adding Hoe.plugins.delete :doofus to the Rakefile that takes effect when running this workflow will be necessary.

@halostatue
Copy link
Member Author

mime-types-data is now fully automated. Hopefully next week we will see the data release as soon as I review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants