pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

able to get task results from failed tasks

Open cugykw opened this issue 3 years ago • 1 comments

Feature request

We have a pipeline with a scan task that generates a report file. In addition, this scanning task will act as a gatekeeper, and the task will fail when there are serious vulnerabilities. In general, a report file is generated and there is a corresponding link. There is a final task that will send a message containing this link to the triggering user.

But now once the scan task fails, the task result cannot be obtained. We want to be able to get task results from failed tasks.

Use case

The usage scenario can refer to the above description.

Below is a simplified use case.

spec:
  finally:
  - name: xxxx
    params:
    - name: test_url
      ## Whether the 'yyyy' task fails or succeeds, as long as there is a task result, the 'xxxx' task will be executed.
      value: $(tasks.yyyy.results.task-result)
    taskSpec:
      params:
      - name: test_url
        type: string
      spec: null
      steps:
      - image: xxxx
        name: xxxx
        resources: {}
        script: |-
          echo $(params.test_url)
  tasks:
  - name: yyyy
    taskSpec:
      results:
      - description: code scan result
        name: task-result
        type: string
      steps:
      - image: xxxx
        name: xxxx
        script: |-
          ./start
          echo 'https://xxxx.html' > $(results.task-result.path)
          ## do something

cugykw avatar Nov 14 '22 12:11 cugykw

duplicate of or related to https://github.com/tektoncd/pipeline/issues/3749

jerop avatar Feb 02 '23 16:02 jerop

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar May 03 '23 17:05 tekton-robot