#55 Add optional trigger_rebuild to run schema
Merged 4 years ago by mvadkert. Opened 4 years ago by mvadkert.
fedora-ci/ mvadkert/messages rfe-trigger-rebuild  into  master

file modified
+7 -1
@@ -38,10 +38,16 @@ 

          type: string

      rebuild:

          description:

-             URL to rebuild the run.

+             URL to rebuild the run. Usually leads to a separate page with rebuild options.

          examples:

              - https://somewhere.com/job/ci-openstack/4794/rebuild/parametrized

          type: string

+     trigger_rebuild:

+         description:

+             URL to trigger a rebuild of a run. GET request to this URL triggers rebuild.

+         examples:

+             - https://somewhere.com/job/ci-openstack/4794/rebuild/parametrized?param1=value1&param2=value2

+         type: string

      debug:

          description:

              URL of debug log.

Context: currently we have no better way of retriggering tests than to use directly the CI systems. We will change this in the future with introducing test rebuild events, or something similar, but for now, we need some additional field to trigger the rebuild. The rebuild link can be used still for parametrized rebuilds.

Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com

Metadata Update from @mvadkert:
- Pull-request tagged with: review-needed

4 years ago

@ralph @jbieren @psss @odockal @happz kindly asking for review

I think the field name of trigger_rebuild could be a little more clear - maybe some name that somehow makes the point that the difference between it and just 'rebuild' is that this one is for GET requests. But otherwise lgtm

@jbieren this was a suggestion from @happz, I will be happy if you have some other suggesion on the name, which is always the hardest part of it all :)

heh, yeah I can't think of anything nice. I just thought at first looking at this that it was the link to the rebuild of the trigger job instead of the actual pipeline run. If others are fine with the change, you can merge, but in the meantime I will keep thinking

Sure, I am open to another suggestion. The purpose is to provide a URL which, when visited, would re-trigger the CI job. Current usage of rebuild field seems to be a URL leading to a form user has to submit, possibly after changing some of the job's parameters.

Maybe we should turn things around - clarify the meaning of rebuild as "trigger the job" and add a new field, e.g. rebuild_form with "trigger the job, but you can modify its parameters".

Personally, I'd prefer to get my hands on the "trigger the job" field over the "with possible modifications" field - my use case is to trigger CI jobs after infrastructure issues automagically, with immutable parameters & environment. Possibility of modifications is nice but to me, it's more in the bells & whistles category.

In my experience (Jenkins only) the rebuild/parameterized link has the parameters already filled in. The ?param=value part doesn't do anything in the UI.. but I would expect it does work via POST calls from the command line.

But yeah, the use case makes sense and all that +1 I was just saying a different field name might work slightly better, but until I have a better name for it I will keep my mouth shut

ok, seems we have 3 acks here, pushing this in ...

Metadata Update from @mvadkert:
- Pull-request untagged with: review-needed
- Pull-request tagged with: review-done

4 years ago

Indeed, the form is pre-filled with parameters used to trigger the job, but one can "submit" the form - it's just a simple matter of encoding parameters & passing them to https://somewhere.com/job/ci-openstack/buildWithParameters endpoint. At this moment, I'm not sure whether it's the URL form is sent to or whether I found it somewhere else, but it works like a charm.

hmm, this pagure rebase seems to "work"

rebased onto 6b1b093

4 years ago

Pull-Request has been merged by mvadkert

4 years ago
Metadata