feat: Include setup
key in published Orb examples
#794
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Adam Harvey [email protected]
This PR is intended to at least partially address address #779.
Checklist
=========
Changes
=======
setup
key in the packed orb examples, so if an orb author wants to recommend to users to require the use of dynamic pipelines, this example is sent as is to the end user.Rationale
=========
I opened a CircleCI Support ticket after we noticed we published examples to some of our users in private orbs, and when they were copying the examples they kept not working. WE realized the
setup: true
key which triggers a dynamic pipeline (allowing the use of the continuation orb, etc) was being filtered out when our examples were being published to the CircelCI web site.Support spun my ticket out to #779 and closed the support ticket. @KyleTryon was kind enough to point to the code schema where the
setup
key did not exist.Considerations
==============
The orb packing test suite is a bit brittle at the moment. So without entirely rewriting it with a much more comprehensive example, I took what was there, slightly simplified the test for an included script which should still make sure that test is valid, but also considers if the pack section slightly reorders the keys, as well as adds a test for my new functionality.
I'd think over time, getting a detailed packed example, possibly put into the repo with samples of commands, jobs, executors, examples, etc, might be worthwhile over time. But not today!
Screenshots
n/a
Here are some helpful tips you can follow when submitting a pull request:
master
.make build
in the repository root.make test
).--debug
flag is often helpful for debugging HTTP client requests and responses.make lint
). Note: This requires Docker to run inside a local job.NB: Local go testing now goes clean for me, so submitting the PR.