Skip to content

Commit 7ab2479

Browse files
lbernicktekton-robot
authored andcommitted
Update git resolver documentation
This commit adjusts an example "pathInRepo" and explains that the unauthenticated git resolution clones the entire repo.
1 parent 8b80e76 commit 7ab2479

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

docs/git-resolver.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This Resolver responds to type `git`.
1212
| `repo` | The repository to find the resource in. Either `url`, or `repo` (with `org`) must be specified, but not both. | `pipeline`, `test-infra` |
1313
| `org` | The organization to find the repository in. Default can be set in [configuration](#configuration). | `tektoncd`, `kubernetes` |
1414
| `revision` | Git revision to checkout a file from. This can be commit SHA, branch or tag. | `aeb957601cf41c012be462827053a21a420befca` `main` `v0.38.2` |
15-
| `pathInRepo` | Where to find the file in the repo. | `/task/golang-build/0.3/golang-build.yaml` |
15+
| `pathInRepo` | Where to find the file in the repo. | `task/golang-build/0.3/golang-build.yaml` |
1616

1717
## Requirements
1818

@@ -47,6 +47,8 @@ The `git` resolver has two modes: cloning a repository anonymously, or fetching
4747

4848
### Anonymous Cloning
4949

50+
Anonymous cloning is supported only for public repositories. This mode clones the full git repo.
51+
5052
#### Task Resolution
5153

5254
```yaml
@@ -90,6 +92,16 @@ spec:
9092
9193
### Authenticated API
9294
95+
The authenticated API supports private repositories, and fetches only the file at the specified path rather than doing a full clone.
96+
97+
When using the authenticated API, [providers with implementations in `go-scm`](https://github.com/jenkins-x/go-scm/tree/main/scm/driver) can be used.
98+
Note that not all `go-scm` implementations have been tested with the `git` resolver, but it is known to work with:
99+
* github.com and GitHub Enterprise
100+
* gitlab.com and self-hosted Gitlab
101+
* Gitea
102+
* BitBucket Server
103+
* BitBucket Cloud
104+
93105
#### Task Resolution
94106

95107
```yaml
@@ -135,17 +147,6 @@ spec:
135147
value: Ranni
136148
```
137149

138-
## What's Supported?
139-
140-
- When using anonymous cloning, only public repositories can be used.
141-
- When using the authenticated API, [providers with implementations in `go-scm`](https://github.com/jenkins-x/go-scm/tree/main/scm/driver) can be used.
142-
Note that not all `go-scm` implementations have been tested with the `git` resolver, but it is known to work with:
143-
* github.com and GitHub Enterprise
144-
* gitlab.com and self-hosted Gitlab
145-
* Gitea
146-
* BitBucket Server
147-
* BitBucket Cloud
148-
149150
## `ResolutionRequest` Status
150151
`ResolutionRequest.Status.Source` field captures the source where the remote resource came from. It includes the 3 subfields: `url`, `digest` and `entrypoint`.
151152
- `url`

0 commit comments

Comments
 (0)