Support parameters when triggering a pipeline
J
Jason Hagglund
The new "trigger a build by project" endpoint in practice triggers entire workflows and not singular jobs. In other words, it does not support specifying a job to trigger via build_parameters the way the other API job trigger does.It would be greatly appreciated if the new endpoint could be made to support build_parameters so as to target particular jobs and not entire workflows. Our primary use case for wanting to trigger jobs outside of a workflow context via the API is ad-hoc mobile app submissions via our Hubot app in Slack. I imagine there would be other uses - there are plenty of opportunities for CircleCI-powered automation outside of a workflow context.
This would be especially helpful given that the other API job triggering endpoint is not supported when using the 2.1 configuration.
CCI-I-690
Liya Ai
L
Liya Ai
open
K
Kristofer Borgstrom
With this API there is still no way to trigger a single job via API (with or without parameters) unless you:
Create a workflow for every single job AND introduce parameters to not run any other workflow
Set up branches for each job with a seperate ci config Neither workaround is feasible in my opinionN
Nathan Dintenfass
The API documented in the preview is live and available for use. We don't anticipate making changes, but until we fill out the rest of the v2 API we'll keep it in "preview" status. I encourage you to give it a try, and let us know what you think. Best way to give feedback for now is to submit issues on that GH repo. The pipeline parameters specifically are documented here:
R
Richard Clayton
Hey, I just wanted to confirm the status -- is this still "on roadmap". I noticed the last comment that it is "in preview". Does that just mean the suggested API is being displayed for dev feedback?
N
Nathan Dintenfass
The above bug using a parameter as the value of parallelism should now be fixed.
N
Nathan Dintenfass
It is intended to work -- but I can reproduce what you're seeing, so I'm filing a bug internally. (CIRCLE-19445)
C
Cooper Rob
With the Build Pipeline parameters now live, is it possible to use the Pipeline params as the
parallelism
argument value?manual_config_build:
parallelism: << pipeline.parameters.parallelism >>
working_directory: ~/my/dir/
....
When trying ths, I get the error:
| 1. [#/jobs/manual_build/parallelism] 0 subschemas matched instead of one
| | 1. [#/jobs/manual_build/parallelism] expected type: Number, found: String
| | | SCHEMA:
| | | type: integer
| | | INPUT:
| | | << pipeline.parameters.parallelism >>
| | 2. [#/jobs/manual_build/parallelism] string [<< pipeline.parameters.parallelism >>] does not match pattern
<<
parameters.([^ ]+) *>> As far as I'm aware, I could set this as a job parameter, but would be unable to pass that parameter in to the API request. Is there a way around this issue?
N
Nathan Dintenfass
The pipeline parameters are now live in preview, per the links posted above. The direct link to preview docs the parameter passing is: https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md
Feel free to post back here, or post Issues on that repo if you have feedback.
m
meixner.tobias
Another month is gone - is there any update on this?
Thank you.
Load More
→