-
Epic
-
Resolution: Done
-
Normal
-
None
-
Pipelines as Code: Manual Events
-
False
-
False
-
To Do
-
100% To Do, 0% In Progress, 0% Done
-
As a user I want to be able to trigger pipelinerun directly without being tighten up to a code flow.
Acceptance Criteria:
- Allow users to manually start a pipelinerun inside a branch
- Add a cli option to kick of those manual events.
- Add a custom event_type (dispatch ?) to explicitly match a event kicked manually to a pipelinerun inside the target branch.
- Make it secure so other users (external or internal to the cluster) cannot kick them on behalf of the user.
Details:
- We can reuse the payload format from the VCS, for example that's a payload on push from github that we can parse and then figure things out the rest from api :
{ "repository": { "html_url": "https://github.com/openshift-pipelines/pipelines-as-code" }, "ref": "refs/heads/main", "head_commit": { "id": "e3327f0dbfcaa6bf9ab700c2ec5fa4a0994d8f35" } }
- We can't reuse the global webhook secret since we don't want it to be shared among users, but we can have a dispatch_secret set in repo crd for the user to set and reuse.
- We can automate almost everything from a `tkn pac dispatch` command getting and setting that secret and generate an event targetting a branch or revision.
- We would just need to ask the users the eventlistenner route (which we may try to detect if user has the rights for it)
- Github Actions documentation of that same feature https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#repository_dispatch
- is documented by
-
RHDEVDOCS-3745 PAC: Document manual trigger for PipelineRun inPAC
- Closed