-
Notifications
You must be signed in to change notification settings - Fork 4
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
CLI: Implement workflow commands #67
Conversation
Implements the workflow create command. The workflow is created from a file containing its definition. A validation for the workflow still needs to be implemented. Additionally workflow create returns "409 Conflict" when creating a workflow with the same name as another existing workflow.
Implements the workflow get command. The workflow get command can be used to retrieve detailed information about an existing workflow.
Implements the workflow assign command. The workflow assing command can be used to assign a workflow to a codeset.
There is no reason to expose such functions/types.
Implements the workflow list-assignments command. This command can be used to list assignments between workflows and codesets.
Implements the workflow list-runs command. This command can be used to list workflow runs.
Set the column names as uppercase for the CLI outputs.
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.
Can't wait to try this !
"github.com/jedib0t/go-pretty/v6/table" | ||
"github.com/jonboulle/clockwork" | ||
"github.com/spf13/cobra" | ||
"github.com/tektoncd/cli/pkg/formatted" |
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.
It could be risky to include a sub-package package from the Tekton CLI, given that it is not a public library and no guarantee that the exposed interface will change from version to version in a backwards-compatible way. But I really like what you've done with it and I think it's worth the risk. Great idea !
cmd.Flags().StringVarP(&o.codesetName, "codeset-name", "c", "", "filter workflow runs by the codeset name") | ||
cmd.Flags().StringVarP(&o.codesetProject, "codeset-project", "p", "", "filter workflow runs by the codeset project") |
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 project is not directly associated with a workflow run, but I'd like to think we'll make that happen really soon. When that happens, these two would be better named codeset
and project
. Basically, all workflow runs created from a codeset would "belong" to the same project as the codeset. And if you only use the codeset name here without specifying the project, you should be able to find the codeset by using the same project that the workflow run is associated with.
But these are just thoughts about the future... all is good here otherwise.
Implements the following workflow commands:
Besides that:
a workflow with the same name as another existing workflow.