-
Notifications
You must be signed in to change notification settings - Fork 1
Adding context option to command line #172
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
Open
russellseymour
wants to merge
5
commits into
main
Choose a base branch
from
feat/task-cli-context
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f9c27a8
Added ability to pass int he context from the command line when testi…
russellseymour ff9b9ba
Added option to import eirctl config files from the command line
russellseymour 0cfa358
Updated documentation
russellseymour 717fbcc
Merge branch 'main' into feat/task-cli-context
russellseymour fd0971a
Fixed linting issue
russellseymour File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # yaml-language-server: $schema=../../../schemas/schema_v1.json | ||
| # fixture used to verify entries supplied via `--import` on the CLI | ||
| # take precedence over any existing entries with the same name | ||
|
|
||
| contexts: | ||
| context:env: | ||
| env: | ||
| FOO: supplied-by-cli-import | ||
|
|
||
| tasks: | ||
| task:from:cli:import: | ||
| command: "echo 'hello from cli import'" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| == Running tasks | ||
|
|
||
| Tasks can use a context configured in the eirctl configuration file. When testing | ||
| a task in another context, use the `--context` option with `eirctl run`: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| eirctl run task task1 --context context:v2 | ||
| ---- | ||
|
|
||
| The option also works with the short form of the command, where the task name | ||
| is supplied without the `task` subcommand: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| eirctl run task1 --context context:v2 | ||
| ---- | ||
|
|
||
| `--context` overrides the context configured on the selected task for that | ||
| invocation. The value must be the name of a context defined in the loaded | ||
| configuration, including any files supplied with `--import`. | ||
|
|
||
| The option applies only to tasks. It cannot be used when running a pipeline: | ||
|
|
||
| [source,bash] | ||
| ---- | ||
| eirctl run pipeline pipeline1 --context context:v2 | ||
| ---- | ||
|
|
||
| The command returns an error when a context override is supplied for a | ||
| pipeline. |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
I wonder if we should just
cl.Load(configFilePath, ...imports)in the initConfig with the additional imports and avoid creating a separate public method on the loader API