gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

Add params (List<Variable>) to play job with params

Open zalgoro opened this issue 3 years ago • 5 comments

https://github.com/gitlab4j/gitlab4j-api/blob/d61308abb39ee0b59c47491ec79b207c2ba6bbc0/src/main/java/org/gitlab4j/api/JobApi.java#L505

zalgoro avatar Jun 11 '21 20:06 zalgoro

Hello @zalgoro

I'm not sure to understand your request. Here is Job API documentation. https://docs.gitlab.com/ee/api/jobs.html#play-a-job As you can see, according to the linked documentation, there is no variables available.

Did you need to create a pipeline with variables? If so, does the Pipeline API works for you? See https://github.com/gitlab4j/gitlab4j-api/blob/db8f9254c7b42c68522826318821be8d7bb8b075/src/main/java/org/gitlab4j/api/PipelineApi.java#L285-L297

jabby avatar Jun 14 '21 22:06 jabby

@jabby As far as I can see since your comment there's a job_variables_attributes parameter on the POST /projects/:id/jobs/:job_id/play endpoint, see the pic & docs:

image

Would you accept such a PR? The parameter was introduced in Gitlab 14.9, March of 2022.

vilmosnagy avatar Dec 23 '22 14:12 vilmosnagy

@vilmosnagy PR are welcomed of course.

jabby avatar Dec 23 '22 22:12 jabby

It seems to me that there's already an open PR for it: #836

vilmosnagy avatar Dec 24 '22 07:12 vilmosnagy

Happy to hear that (https://github.com/gitlab4j/gitlab4j-api/pull/836), It would be nice to merge it asap, and then close the issue.

zalgoro avatar Jan 08 '23 18:01 zalgoro