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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add cron workflow for gTLD update PRs, deprecate tld-update-bot. #513

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

cpu
Copy link
Member

@cpu cpu commented Nov 30, 2020

Description

Previously we used a separate repo with a bash script hooked up to a bot github user in a Travis CI cron build to automatically create PRs updating ZLint TLD data on a periodic basis using the zlint-gtld-update tool from this repo. Recently it's been having reliability issues that made us miss a TLD update: #512

Now that we're using Github Actions we can make things much simpler and self-contained. This commit adds a tld-update.yml workflow that uses a create-pull-request Github action to replace the separate repo/bash script/bot user approach.

Resolves #507

Notable Improvements

  • Reduced dependencies - we can drop the Travis integration, the @tld-update-bot account, and the bot's access to this repo.
  • Consolidation - all of the configuration and logic live in the ZLint repo now as opposed to being spread across the ZLint repo, an automation repo (in a separate Github account!), and Travis CI env vars.
  • More flexible scheduling - the Github Actions cron schedule is more flexible so we can run the new action once every hour instead of just once a day like the Travis version.
  • Smarter integration - unlike the bash script this version shouldn't recreate the same PR over and over if it isn't merged in a timely manner.

Testing

To test the integration I pushed a commit to a fork of ZLint that removed some of the gTLD map data. Afterwards I updated the action to run on push of a specific test branch in addition to the cron schedule. Pushing that test branch resulted in a correct automation PR being opened to add back the removed data (and the missed update from #512). You can see the PR that was opened here. No bot account or bash scripts required 馃帀

Previously we used a separate repo with a bash script[0] hooked up to
a bot github user[1] in a Travis CI cron build to automatically create
PRs updating ZLint TLD data on a periodic basis.

Now that we're using Github Actions we can make things much simpler and
self-contained.

This commit adds a `tld-update.yml` workflow that uses
a create-pull-request Github action to replace the separate repo/bash
script/bot user approach.

Not only does this let us delete the bot user's write access to the
ZLint repo but it's also a smarter integration overall and won't
recreate the same PR over and over if it isn't merged right away. Lastly
the Github Actions cron schedule is more flexible so we can run the new
action once every hour instead of just once a day like the Travis
version.

[0]: https://github.com/cpu/zlint-autopull/blob/master/autopull
[1]: https://github.com/tld-update-bot
[2]: https://github.com/peter-evans/create-pull-request
@cpu cpu self-assigned this Nov 30, 2020
@zakird zakird merged commit 12dfc18 into zmap:master Nov 30, 2020
@cpu cpu deleted the cpu-tld-update-action branch November 30, 2020 23:07
@cpu
Copy link
Member Author

cpu commented Nov 30, 2020

I removed @tld-update-bot's access to the ZLint repo.

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

Successfully merging this pull request may close these issues.

Implement zlint-autopull with Github Actions
2 participants