TKN-PIPELINE-START(1)

NAME

tkn-pipeline-start - Start Pipelines

SYNOPSIS

tkn pipeline start

DESCRIPTION

To start a pipeline, you will need to pass the following:

    •   Workspaces

    •   Parameters, at least those that have no default value

OPTIONS

--dry-run[=false]
    preview PipelineRun without running it

-E, --exit-with-pipelinerun-error[=false]
    when using --showlog, exit with pipelinerun to the unix shell, 0 if success, 1 if error, 2 on unknown status

-f, --filename=""
    local or remote file name containing a Pipeline definition to start a PipelineRun

--finally-timeout=""
    timeout for Finally TaskRuns

-h, --help[=false]
    help for start

-l, --labels=[]
    pass labels as label=value.

-L, --last[=false]
    re-run the Pipeline using last PipelineRun values

-o, --output=""
    format of PipelineRun (yaml, json or name)

-p, --param=[]
    pass the param as key=value for string type, or key=value1,value2,... for array type, or key="key1:value1, key2:value2" for object type

--pipeline-timeout=""
    timeout for PipelineRun

--pod-template=""
    local or remote file containing a PodTemplate definition

--prefix-name=""
    specify a prefix for the PipelineRun name (must be lowercase alphanumeric characters)

--resolvertype=""
    resolver type for remote pipelines (hub, git, http, cluster, bundle, remote)

-s, --serviceaccount=""
    pass the serviceaccount name

--showlog[=false]
    show logs right after starting the Pipeline

--skip-optional-workspace[=false]
    skips the prompt for optional workspaces

--task-serviceaccount=[]
    pass the service account corresponding to the task

--tasks-timeout=""
    timeout for Pipeline TaskRuns

--use-param-defaults[=false]
    use default parameter values without prompting for input

--use-pipelinerun=""
    use this pipelinerun values to re-run the pipeline.

-w, --workspace=[]
    pass one or more workspaces to map to the corresponding physical volumes

OPTIONS INHERITED FROM PARENT COMMANDS

-c, --context=""
    name of the kubeconfig context to use (default: kubectl config current-context)

-k, --kubeconfig=""
    kubectl config file (default: $HOME/.kube/config)

-n, --namespace=""
    namespace to use (default: from $KUBECONFIG)

-C, --no-color[=false]
    disable coloring (default: false)

EXAMPLE

To run a Pipeline that has one workspace and no parameter.

    $ tkn pipeline start --workspace name=my-empty-dir,emptyDir=""

To create a workspace-template.yaml

    $ cat <<EOF > workspace-template.yaml
    spec:
        accessModes:
            - ReadWriteOnce
        resources:
            requests:
                storage: 1Gi
    EOF

To create a csi-template.yaml

    ```sh
    $ cat <<EOF > csi-template.yaml
    driver: secrets-store.csi.k8s.io
    readOnly: true
    volumeAttributes:
        secretProviderClass: "vault-database"
    EOF
    ```

To run a Pipeline that has two parameters (foo and bar) and six workspaces (my-config, my-pvc, my-secret, my-empty-dir, my-csi-template and my-volume-claim-template)

    $ tkn pipeline start \
        --param foo=yay \
        --param bar=10 \
        --workspace name=my-secret,secret=secret-name \
        --workspace name=my-config,config=rpg,item=ultimav=1 \
        --workspace name=my-empty-dir,emptyDir="" \
        --workspace name=my-pvc,claimName=pvc1,subPath=dir
        --workspace name=my-volume-claim-template,volumeClaimTemplateFile=workspace-template.yaml
        --workspace name=my-csi-template,csiFile=csi-template.yaml

SEE ALSO

tkn-pipeline(1)