管道卡在克隆 Git 存储库的循环中?

问题描述 投票:0回答:0

我刚开始学习Tekton。我有一个包含以下内容的 Tekton 管道,取自这篇文章

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: clone-read
spec:
  description: | 
    This pipeline clones a git repo, then echoes the README file to the stout.
  params:
 - name: repo-url
    type: string
    description: The git repo URL to clone from.
  workspaces:
 - name: shared-data
    description: | 
      This workspace contains the cloned repo files, so they can be read by the
      next task.
 - name: git-credentials
    description: My ssh credentials
  tasks:
 - name: fetch-source
    taskRef:
      kind: ClusterTask
      name: git-clone
    workspaces:
    - name: output
      workspace: shared-data
    - name: ssh-directory
      workspace: git-credentials
    params:
      - name: url
        value: $(params.repo-url)
      - name: revision
        value: branch-name
      - name: submodules
        value: 'true'
      - name: depth
        value: '1'
      - name: sslVerify
        value: 'true'
      - name: sparseCheckoutDirectories
        value: /path/to/directory/
      - name: deleteExisting
        value: 'true'
      - name: verbose
        value: 'true'
      - name: gitInitImage
        value: >-
          registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:<hash>
      - name: userHome
        value: /tekton/home
 - name: show-readme
    runAfter: ["fetch-source"]
    taskRef:
      name: show-readme
    workspaces:
    - name: source
      workspace: shared-data

当我运行它时,它会在事件选项卡中找到这两个事件,并一遍又一遍地发布它们。当我停止它的时候,它们已经在 30 分钟内发布了 119 次:

Error: container has runAsNonRoot and image will run as root (pod: "clone-read-2ol4nq-fetch-source-7xfk6-pod-7w7jx_<namespace>(<guid>)", container: place-tools)
Container image "registry.redhat.io/openshift-pipelines/pipelines-entrypoint-rhel8@sha256:<hash>" already present on machine

我该如何修复它们?

openshift tekton tekton-pipelines
© www.soinside.com 2019 - 2024. All rights reserved.