-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: support environment templates #30
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ddneilson
force-pushed
the
ddneilson/16583
branch
from
January 19, 2024 15:43
bb61b46
to
ef29c3d
Compare
ddneilson
commented
Jan 19, 2024
ddneilson
force-pushed
the
ddneilson/16583
branch
8 times, most recently
from
January 19, 2024 16:56
918cf7c
to
b9d53f8
Compare
mwiebe
requested changes
Jan 19, 2024
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.
Looks great! I have a small suggested tweak to how the CLI argument works.
justinsaws
previously approved these changes
Jan 23, 2024
jusiskin
requested changes
Jan 24, 2024
ddneilson
force-pushed
the
ddneilson/16583
branch
from
January 24, 2024 20:58
b9d53f8
to
e2c6b87
Compare
mwiebe
previously approved these changes
Jan 24, 2024
Environment Templates are a part of the spec that allows an Environment to be defined outside of a Job Template, but still be applied when running Job(s) created from the Job Template. The CLI doesn't support these yet. This commit teaches the CLI about environment templates: 1. In the 'check' command, to verify a template syntax; 2. In the 'schema' command, to generate json schema for EnvironmentTemplates; and 3. In the 'run' command, to apply Environments when running a Job locally. The implementation of this also applies a few small cleanups and refactors to make the implementation more straightforward. Signed-off-by: Daniel Neilson <[email protected]>
ddneilson
force-pushed
the
ddneilson/16583
branch
from
January 24, 2024 21:22
e2c6b87
to
2b7151d
Compare
jusiskin
approved these changes
Jan 24, 2024
mwiebe
approved these changes
Jan 24, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was the problem/requirement? (What/Why)
Environment Templates are a part of the spec that allows an Environment to be defined outside of a Job Template, but still be applied when running Job(s) created from the Job Template. The CLI doesn't support these yet.
What was the solution? (How)
This commit teaches the CLI about environment templates:
The implementation of this also applies a few small cleanups and refactors to make the implementation more straightforward.
There's also a bit of cleanup around "bundles" (not a thing) and the README.
What is the impact of this change?
The CLI understands what Environment Templates are, and lets the end-user work with them.
How was this change tested?
I've run tests locally just by running the CLI, and I've enhanced the unit tests to cover the functionality. I've also modified a couple of tests to no longer look for mocked calls but to, instead, actually run code and look at the results to determine whether it's functioning correctly or not.
Was this change documented?
Yes, I modified the README to cover the new CLI options.
Is this a breaking change?
No, all added CLI options are 100% optional.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.