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

Results not recorded when task fails

XMLWordPrintable

    • 5
    • False
    • False
    • Undefined
    • Pipelines Sprint 251, Pipelines Sprint 252, Pipelines Sprint 253

      Expected behavior

      • If a task generates a result, it should be recorded no matter what is the status of taskrun.
      • If a pipeline generates a result, it should be recorded no matter what is the status of its taskruns.

      Actual behavior

      When a task run fails, neither task run nor pipeline run has any results.

      Reproducer

      apiVersion: tekton.dev/v1
      kind: Pipeline
      metadata:
        name: hello-pipeline
      spec:
        tasks:
        - name: hello
          taskSpec:
            results:
            - name: greeting1
            steps:
            - name: greet
              image: registry.access.redhat.com/ubi8/ubi-minimal
              script: |
                #!/usr/bin/env bash
                set -e
                echo -n "Hello World!" | tee $(results.greeting1.path)
                exit 1
        results:
        - name: greeting2
          value: $(tasks.hello.results.greeting1)
      

      Notes

      upstream issue https://github.com/tektoncd/pipeline/issues/3749

              Unassigned Unassigned
              ppitonak Pavol Pitoňák
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: