tektoncd/pipeline

Results doesn't work on Windows

Offen

#5.102 geöffnet am 07.07.2022

 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (1.943 Forks)auto 404
help wantedkind/buglifecycle/frozen

Repository-Metriken

Stars
 (9.013 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Hey, I'm not able to reference results from the task on Windows nodes, in Linux it works without any problems.

  • Tekton Pipeline version: v0.35.1

  • Pipeline definition:

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: results-win
  labels:
    framework: tekton-framework
spec:
  tasks:
  - name: get-commit-hash
    taskSpec:
      results:
      - name: commit-hash
      steps:
      - image: "mcr.microsoft.com/windows/servercore:1809"
        name: doit
        script: |
          #!win powershell.exe -File
          "Dummy message" | Out-File -FilePath $(results.commit-hash.path)

  - name: print-commit-hash
    params:
      - name: hash
        value: $(tasks.get-commit-hash.results.commit-hash)
    taskSpec:
      params:
        - name: hash
          type: string
      steps:
      - image: "mcr.microsoft.com/windows/servercore:1809"
        name: doit
        script: |
          #!win powershell.exe -File
          Write $(params.hash)
    runAfter:
    - get-commit-hash

Getting this error in PipelineRun: image

Results documentation (https://tekton.dev/docs/pipelines/tasks/#emitting-results) states that results files are created in hardcoded /tekton/results directory, which won't work in Windows.

Am I doing something wrong, or this is actually a bug?

Contributor Guide