Skip to content

Commit

Permalink
Update git resolver documentation
Browse files Browse the repository at this point in the history
This commit adjusts an example "pathInRepo" and explains that the unauthenticated
git resolution clones the entire repo.
  • Loading branch information
lbernick authored and tekton-robot committed Feb 3, 2023
1 parent 8b80e76 commit 7ab2479
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions docs/git-resolver.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This Resolver responds to type `git`.
| `repo` | The repository to find the resource in. Either `url`, or `repo` (with `org`) must be specified, but not both. | `pipeline`, `test-infra` |
| `org` | The organization to find the repository in. Default can be set in [configuration](#configuration). | `tektoncd`, `kubernetes` |
| `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` |
| `pathInRepo` | Where to find the file in the repo. | `task/golang-build/0.3/golang-build.yaml` |

## Requirements

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

### Anonymous Cloning

Anonymous cloning is supported only for public repositories. This mode clones the full git repo.

#### Task Resolution

```yaml
Expand Down Expand Up @@ -90,6 +92,16 @@ spec:
### Authenticated API
The authenticated API supports private repositories, and fetches only the file at the specified path rather than doing a full clone.
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.
Note that not all `go-scm` implementations have been tested with the `git` resolver, but it is known to work with:
* github.com and GitHub Enterprise
* gitlab.com and self-hosted Gitlab
* Gitea
* BitBucket Server
* BitBucket Cloud

#### Task Resolution

```yaml
Expand Down Expand Up @@ -135,17 +147,6 @@ spec:
value: Ranni
```

## What's Supported?
- When using anonymous cloning, only public repositories can be used.
- 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.
Note that not all `go-scm` implementations have been tested with the `git` resolver, but it is known to work with:
* github.com and GitHub Enterprise
* gitlab.com and self-hosted Gitlab
* Gitea
* BitBucket Server
* BitBucket Cloud

## `ResolutionRequest` Status
`ResolutionRequest.Status.Source` field captures the source where the remote resource came from. It includes the 3 subfields: `url`, `digest` and `entrypoint`.
- `url`
Expand Down

0 comments on commit 7ab2479

Please sign in to comment.