Skip to content

mlrawlings/canary

Repository files navigation

Canary in the CI

Discover regressions before they impact your project's ecosystem 💪

Build Status Coverage Status Built with Probot

How it works

  • 🚀 When a project that has Canary in the CI (citci) installed makes a commit, its CI runs and upon successful completion, it can publish a canary version from the commit.
  • 🔎 We then find for other projects that have citci installed and depend on the project which just released the canary.
  • ⚡️ For each of those projects, we create a new branch and update it to use the new canary version.
  • ✅ The CI for the dependent project runs and citci reports back on its status.

Getting setup

Install the Canary in the CI app in the repository of a project (source repository) and in the repositories of at least one other project that depends on the first project (dependent repositories). If you don't own a dependent repository, you can ask its maintainer to install the app.

Note: A project might be a source repository, but it could also be a dependent repository for another project.

Prerequisites

Source Repositories

  • The repo must be public
  • The repo must have a form of Continuous Integration (CI)

Dependent Repositories

  • The repo must have at least one package.json file somewhere in the project
  • The repo must have a form of Continuous Integration (CI) that sets commit statuses on branches
  • The CI must be active on the repo and be allowed to act on new branches
  • The default branch for the repo (master) always passes the CI

Configure your CI

In the source repository, npm install citci. Modify your CI script to run citci upon success. This will release a canary version and trigger the builds of dependent repositories. You'll also need to configure your CI with npm credentials so you can publish the canary version. If you're using lerna, we recommend using lerna publish --canary && citci --no-publish.

Dependent repositories don't need any additional setup besides installing the app.

Example CI setups

Contributing

If you have suggestions for improvements, or want to report a bug, open an issue! We'd love all and any contributions.

Resources

Future

Support additional code hosts beyond GitHub

  • BitBucket
  • GitLab

Support additional package types beyond npm

  • RubyGem
  • PyPi
  • Maven
  • APT
  • YUM

For more, check out the Contributing Guide.

License

MIT © 2019 Michael Rawlings [email protected]

Bird icon made by Freepik from flaticon.com

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published