pipeline/examples
Dan Lorenc ee806d2588 Change the path used by the image digest exporter to the standard output path structure.
Previously we were writing output digests to /builder/home/image-output-paths. This commit
unifies that system and expects tasks to output these files to /workspace/output/<resource name>.

This does introduce a change in behavior, but support is retained for the old location. A warning
is logged if the binary finds an index.json in the old location.
2019-10-29 15:27:26 -05:00
..
pipelineruns Set defaults for Tasks embedded in TaskRuns 2019-10-16 04:08:20 -05:00
taskruns Change the path used by the image digest exporter to the standard output path structure. 2019-10-29 15:27:26 -05:00
README.md kubectl apply not work for examples with the genereateName 2019-10-07 03:52:16 -05:00

Examples

This directory contains examples of Tekton Pipelines in action.

To deploy them to your cluster (after installing the CRDs and running the controller):

Some examples have metadata:generateName instead of metadata:name. These examples can not be executed by kubectl apply. Please use kubectl create instead.

In few examples to demonstrate tasks that push image to registry, sample URL gcr.io/christiewilson-catfactory is used. To run these examples yourself, you will need to change the values of this sample registry URL to a registry you can push to from inside your cluster. If you are following instructions here to setup then use the value of $KO_DOCKER_REPO instead of gcr.io/christiewilson-catfactory.

# To invoke the build-push Task only
kubectl apply -f examples/taskruns/taskrun.yaml

# To invoke the simple Pipeline
kubectl apply -f examples/pipelineruns/pipelinerun.yaml

# To invoke the Pipeline that links outputs
kubectl apply -f examples/pipelineruns/output-pipelinerun.yaml

# To invoke the TaskRun with embedded Resource spec and task Spec
kubectl apply -f examples/taskruns/git-resource-spec-taskrun.yaml

Results

You can track the progress of your taskruns and pipelineruns with this command, which will also format the output nicely.

$ kubectl get taskruns -o=custom-columns-file=./test/columns.txt
NAME              TYPE        STATUS    START
test-git-branch   Succeeded   True      2019-02-11T21:21:03Z
test-git-ref      Succeeded   True      2019-02-11T21:21:02Z
test-git-tag      Succeeded   True      2019-02-11T21:21:02Z
$ kubectl get pipelineruns -o=custom-columns-file=./test/columns.txt
NAME                  TYPE        STATUS    START
demo-pipeline-run-1   Succeeded   True      2019-02-11T21:21:03Z
output-pipeline-run   Succeeded   True      2019-02-11T21:35:43Z

You can also use kubectl get tr or kubectl get pr to query all taskruns or pipelineruns respectively.