This Resolver responds to type git
.
Param Name | Description | Example Value |
---|---|---|
url |
URL of the repo to fetch. | https://github.com/tektoncd/catalog.git |
commit |
git commit SHA to checkout a file from. | aeb957601cf41c012be462827053a21a420befca |
branch |
The branch name to checkout a file from. Either this or commit but not both. | main |
path |
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
alpha
feature gate enabled. ko
installed.- The
tekton-remote-resolution
namespace andResolutionRequest
controller installed. See ../README.md.
- Install the Git resolver:
$ ko apply -f ./gitresolver/config
This 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/sbwsg/catalog.git
- name: branch
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.