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

[Downstream CI] automate manual approval gate tests

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • Pipelines 1.15.0
    • QA
    • None
    • 3
    • False
    • None
    • False
    • Pipelines Sprint Release 8, Pipelines Sprint Release 9

      Story (Required)

      As a QE, I want to run basic tests for manual approval automatically for every build.

      Background (Required)

      Manual approval is a new feature introduced in 1.15.0
      design doc: https://docs.google.com/document/d/1WHu3LK58nfu19imeutVs9kqqyo3B9ArQ49roGaCHzFk/edit

      Approach (Required)

      Create set of basic tests - one approving the task manually and one using CLI, two more for disapproving the task manually and using CLI. Sample pipeline

      apiVersion: tekton.dev/v1
      kind: Pipeline
      metadata: 
        name: manual-approval-pipeline
      spec: 
        tasks: 
        - name: task-1
          taskSpec: 
            steps: 
            - name: hello
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                echo "Hello from task 1"
        - name: task-2
          taskRef: 
            apiVersion: openshift-pipelines.org/v1alpha1
            kind: ApprovalTask
          params: 
          - name: approvers
            value: 
            - foo
            - bar
            - tekton
          - name: numberOfApprovalsRequired
            value: 1
          - name: description
            value: Approval Task Rocks!!!
          runAfter: 
          - task-1
        - name: task-3
          taskSpec: 
            steps: 
            - name: hello
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                echo "Hello from task 3"
          runAfter: 
          - task-2
        finally: 
        - name: final-task
          taskSpec: 
            steps: 
            - name: hello
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                echo "Hello from task 2"
      

              vigneshsri Sri Vignesh Selvan
              ppitonak Pavol Pitoňák
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: