-
Notifications
You must be signed in to change notification settings - Fork 77
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
Improve migration docs #220
base: master
Are you sure you want to change the base?
Changes from 3 commits
aff1fb6
bfaa8a8
09be881
549aa4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,13 +34,30 @@ usage: | |
tags: | ||
only: /.*/ | ||
# Because our publishing job has a tag filter, we must also apply a filter to each job it depends on. | ||
- orb-tools/pack: | ||
requires: | ||
- command-tests | ||
- <my-orb>/my_job | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- orb-tools/publish: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure we need to bake in the dev orb publishing process by default. It may be good for documentation but I'm worried it could also complicate the example as it is not a required step. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it depends what you mean by "required". IMO, if we're only going to have one single usage example, that example ought to be "an example of best practice" ... and IMO most users will want dev publishes (not on forked PRs of course, but on internal ones). So, while I agree that it does make things a little more complicated, if we remove it then either "just about everyone" will need to manually re-add it or they'll end up developing orbs without access to this almost indispensable feature and find that they're making their development experience needlessly hard. TL;DR: I understand your concerns ... but I disagree 😉 |
||
name: publish_dev_test | ||
orb_name: <namespace>/<my-orb> | ||
pub_type: dev | ||
vcs_type: <<pipeline.project.type>> | ||
requires: [orb-tools/pack] | ||
context: [orb-publishing-context] | ||
filters: | ||
tags: | ||
ignore: /^v[0-9]+\.[0-9]+\.[0-9]+$/ | ||
branches: | ||
ignore: /^pull/[0-9]+/ | ||
- orb-tools/publish: | ||
orb_name: <namespace>/<my-orb> | ||
pub_type: production | ||
vcs_type: <<pipeline.project.type>> | ||
requires: | ||
- command-tests | ||
- <my-orb>/my_job | ||
requires: [orb-tools/pack] | ||
context: [orb-publishing-context] | ||
filters: | ||
tags: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all changes to the CI process to keep this a docs only change. Was there a reason for these config changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasons are two-fold.
Improved example of how to build an orb
This orb is the orb that builds orbs; it is "the primary source of truth" when it comes to building orbs.
As a result, the documentation here (especially the example code) in this orb contains the most "official" recommendation for how to build an orb.
This PR updates the example orb-build code such that CI builds from forked-PRs don't try to do a dev-publish (as they wouldn't have access to the context, e.g. as demonstrated by the failure in this orb PR).
i.e. this makes the orb build process suitable for use "in the more general usecase".
This change is an essential step on the road towards enabling forked-PR builds on CircleCI's public orbs.
While I accept that this step isn't the only thing that'll need to change (as per your previous comments about malicious PRs), it is the only thing that will need to change within this orb's source code - all the other concerns will be solved by changes in other places.
i.e. this change to "how we should all be building orbs" is "the final link in the chain" towards having viable public CI builds of forked-PRs on orb code.
Dogfooding
aka "Eating your own dog food" aka "Drinking our own champagne".
If we're going to tell everyone else to do this, we should "Put our money where our mouth is" and do it ourselves.
... and because this orb is, itself, an orb, it should follow its own recommendations (otherwise we'll look insincere and hypocritical).
In summary
We should all be doing orb builds in a forked-PR-friendly manner, including CircleCI's orb-tools orb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree with the changes shown here should be added, we can not accept them as part of the same PR that makes changes to the docs, as we are going to be required to squash the commits and rename them using our conventional commit standard.
I recommend we break this up into at least two separate PRs, one for the migration guide, and one for the CI and usage example changes.