Skip to content
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

Workflow.addJob should accept a WorkflowJob as an overload (or create addWorkflowJob) #185

Open
joethompson14 opened this issue Jul 6, 2023 · 0 comments

Comments

@joethompson14
Copy link

addJob(job: Job, parameters?: WorkflowJobParameters): this {

Symptom

When referencing an orb, there is no convenient way to reference an orb-defined job inside of a Workflow using dot-chaining. Looking at test code, it appears the way an orb job should be used is to pass the OrbRef to the WorkflowJob constructor and set the required parameters.

Once this is done, however, the only way to supply the WorkflowJob to a workflow is via the constructor. This is awkward as it is not compatible with the addJob interface also provided by the class.

Feature request

Allow addJob to accept a WorkflowJob or create a function addWorkflowJob within Workflow. Whichever of these is chosen, there needs to be an argument that allows additional WorkflowJobParameters (such as context, name, or requires) to be passed in and added to the parameter list already present in the WorkflowJob.

Another option could be to create a ReusedJob similar to commands/executors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant