<p>We want to use <a href="https://hub.tekton.dev/tekton/task/buildpacks" rel="nofollow noreferrer">the official Tekton buildpacks task</a> from Tekton Hub to run our builds using Cloud Native Buildpacks. The <a href="https://buildpacks.io/docs/tools/tekton/" rel="nofollow noreferrer">buildpacks documentation for Tekton</a> tells us to install the <code>buildpacks</code> &amp; <code>git-clone</code> Task from Tekton Hub, create <code>Secret</code>, <code>ServiceAccount</code>, <code>PersistentVolumeClaim</code> and <a href="https://buildpacks.io/docs/tools/tekton/#43-pipeline" rel="nofollow noreferrer">a Tekton <code>Pipeline</code></a>.</p>
<p>As the configuration is parameterized, we don't want to start our Tekton pipelines using a huge kubectl command but instead configure the <code>PipelineRun</code> using a separate <code>pipeline-run.yml</code> YAML file (<a href="https://buildpacks.io/docs/tools/tekton/#5-create--apply-pipelinerun" rel="nofollow noreferrer">as also stated in the docs</a>) containing the references to the <code>ServiceAccount</code>, workspaces, image name and so on:</p>
<pre><code>apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: buildpacks-test-pipeline-run
spec:
  serviceAccountName: buildpacks-service-account # Only needed if you set up authorization
  pipelineRef:
    name: buildpacks-test-pipeline
  workspaces:
    - name: source-workspace
      subPath: source
      persistentVolumeClaim:
        claimName: buildpacks-source-pvc
    - name: cache-workspace
      subPath: cache
      persistentVolumeClaim:
        claimName: buildpacks-source-pvc
  params:
    - name: image
      value: &lt;REGISTRY/IMAGE NAME, eg gcr.io/test/image &gt; # This defines the name of output image
</code></pre>
<p>Now running the Tekton pipeline once is no problem using <code>kubectl apply -f pipeline-run.yml</code>. But how can we restart or reuse this YAML-based configuration for all the other pipelines runs?</p>

<p><a href="https://github.com/tektoncd/cli/" rel="nofollow noreferrer">tkn cli</a> has the switch --use-pipelinerun to the command <code>tkn pipeline start</code>, what this command does is to reuse the params/workspaces from that pipelinerun and create a new one, so effectively &quot;restarting&quot; it.</p>
<p>so to 'restart' the pipelinerun pr1 which belong to the pipeline p1 you would do:</p>
<p><code>tkn pipeline start p1 --use-pipelinerun pr1</code></p>
<p>maybe we should have a easier named command, I kicked the discussion sometime ago feel free to contribute a feedback :</p>
<p><a href="https://github.com/tektoncd/cli/issues/1091" rel="nofollow noreferrer">https://github.com/tektoncd/cli/issues/1091</a></p>
