Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-2617

Trigger pipelinerun manually

    XMLWordPrintable

Details

    • Pipelines as Code: Manual Events
    • False
    • False
    • To Do
    • 0
    • 0% 0%

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            pchandra@redhat.com Preeti Chandrashekar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: