Using your first workspace
For this first workspace example, you will clone a Git repository and share this repository's content to a second step to list this folder's content:
- First, start with a new file called
clone-ls.yaml
. This file will contain a new task namedclone-and-list
:apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: clone-and-list spec:
- To make this task as generic as possible, it will take a parameter for the repository's URL to clone. You can specify any Git repository as the
default
value:params: - name: repo type: string description: Git repository to be cloned default: https://github.com/joellord/handson-tekton
- Next, you will need to define
workspaces
for this task. In this task, you will use a single workspace with the namesource
:workspaces: - name: source
...