How to create new commands in Zuul CI to trigger custom jobs

460 Views Asked by At

Similar to recheck command, if I want to create custom trigger commands in Zuul CI, what's the best possible way to implement it?

For example, I want to have following 2 commands defined in Zuul to trigger specific tests.

/test-e2e - This would trigger a specific job that runs e2e tests

/test-conformance - This would trigger a specific job that triggers conformance tests.

Can somebody please advise?

1

There are 1 best solutions below

1
On

Assuming that you are using GitHub to manage you source code you could define a custom regex trigger for you check pipeline

See documentation of pipeline.trigger.<github source>.comment

Something like this:

- pipeline:
    name: check
    trigger:
      github:
        - event: pull_request
          action: comment
          comment: (?i)^\s*test-e2e\s*$