Triggering and running a pipeline

A PipelineRun starts a Pipeline and ties it to the Git and image resources that should be used for the specific invocation.

Procedure

  1. Start the Pipeline as follows:

    $ tkn pipeline start petclinic-deploy-pipeline \
            -r app-git=petclinic-git \
            -r app-image=petclinic-image \
            -s pipeline
    
    Pipelinerun started: petclinic-deploy-pipeline-run-q62p8
    • The -r flag specifies the PipelineResource s that should be provided to the pipeline

    • The -s flag specifies the service account to be used for running the pipeline

      Starting a pipeline instantiates the PipelineRun and creates a number of pods to execute the tasks that are defined in the pipeline. The PipelineRun automatically creates and triggers the TaskRuns for each Task in the pipeline.

  2. After a few minutes, verify that the Pipeline ran successfully by listing all the PipelineRuns as follows:

    $ tkn pipeline list
    
    NAME                        AGE             LAST RUN                              STARTED         DURATION    STATUS
    petclinic-deploy-pipeline   7 minutes ago   petclinic-deploy-pipeline-run-tsv92   5 minutes ago   4 minutes   Succeeded