This Resolver responds to type git.
| Param Name | Description | Example Value |
|---|---|---|
url |
URL of the repo to fetch. | https://github.com/tektoncd/catalog.git |
revision |
Git revision to checkout a file from. This can be commit SHA, branch or tag. | aeb957601cf41c012be462827053a21a420befca main v0.38.2 |
pathInRepo |
Where to find the file in the repo. | /task/golang-build/0.3/golang-build.yaml |
- A cluster running Tekton Pipelines from its main branch
with the
alphafeature gate enabled. koinstalled.- The
tekton-remote-resolutionnamespace andResolutionRequestcontroller installed. See ../README.md.
- Install the Git resolver:
$ ko apply -f ./gitresolver/configThis resolver uses a ConfigMap for its settings. See
./config/git-resolver-config.yaml
for the name, namespace and defaults that the resolver ships with.
| Option Name | Description | Example Values |
|---|---|---|
fetch-timeout |
The maximum time any single git resolution may take. Note: a global maximum timeout of 1 minute is currently enforced on all resolution requests. | 1m, 2s, 700ms |
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: git-demo
spec:
pipelineRef:
resolver: git
resource:
- name: url
value: https://github.com/tektoncd/catalog.git
- name: revision
value: main
- name: pathInRepo
value: pipeline/simple/0.1/simple.yaml
params:
- name: name
value: Ranni$ cat <<EOF > rrtest.yaml
apiVersion: resolution.tekton.dev/v1alpha1
kind: ResolutionRequest
metadata:
name: fetch-catalog-task
labels:
resolution.tekton.dev/type: git
spec:
params:
url: https://github.com/tektoncd/catalog.git
path: /task/golang-build/0.3/golang-build.yaml
EOF
$ kubectl apply -f ./rrtest.yaml
$ kubectl get resolutionrequest -w fetch-catalog-task- At the moment the git resolver can only access public repositories.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.