tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.51k stars 1.78k forks source link

multiple interpolations in stepResult substitution should be allowed #7764

Closed ericzzzzzzz closed 7 months ago

ericzzzzzzz commented 8 months ago

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

  1. return on enable-step-actions feature flag
  2. create this taskRun
   apiVersion: tekton.dev/v1alpha1
kind: StepAction
metadata:
  name: step-action
spec:
  image: alpine
  results:
    - name: result1
    - name: result2
  script: |
    echo "I am a Step Action!!!" >> $(step.results.result1.path)
    echo "I am a hidden step action!!!" >> $(step.results.result2.path)
---
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: step-action-run
spec:
  TaskSpec:
    results:
      - name: step-result
        value: $(steps.action-runner.results.result1)
    steps:
      - name: action-runner
        ref:
          name: step-action
      - name: test-multiple-interpolations
        image: busybox
        command:
          - "echo"
          - "$(steps.action-runner.results.result1)-$(steps.action-runner.results.result2)"

Tekton pipeline Version v0.57

ericzzzzzzz commented 8 months ago

/assign ericzzzzzzz