gitrepo: add docs for tag verification

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This commit is contained in:
Sanskar Jaiswal 2023-08-17 18:21:51 +05:30
parent 035d514af3
commit 51d842c708
No known key found for this signature in database
GPG Key ID: 5982D0279C227FFD
1 changed files with 21 additions and 3 deletions

View File

@ -366,8 +366,17 @@ spec:
`.spec.verify` is an optional field to enable the verification of Git commit `.spec.verify` is an optional field to enable the verification of Git commit
signatures. The field offers two subfields: signatures. The field offers two subfields:
- `.mode`, to specify what Git commit object should be verified. Only supports - `.mode`, to specify what Git object(s) should be verified. Supported
`head` at present. values are:
- `HEAD`: Verifies the commit object pointed to by the HEAD of the repository
after performing a checkout via `.spec.ref`.
- `head`: Same as `HEAD`, supported for backwards compatibility purposes.
- `Tag`: Verifies the tag object pointed to by the specified/inferred tag
reference in `.spec.ref.tag`, `.spec.ref.semver` or `.spec.ref.name`.
- `TagAndHEAD`: Verifies the tag object pointed to by the specified/inferred tag
reference in `.spec.ref.tag`, `.spec.ref.semver` or `.spec.ref.name` and
the commit object pointed to by the tag.
- `.secretRef.name`, to specify a reference to a Secret in the same namespace as - `.secretRef.name`, to specify a reference to a Secret in the same namespace as
the GitRepository. Containing the (PGP) public keys of trusted Git authors. the GitRepository. Containing the (PGP) public keys of trusted Git authors.
@ -384,7 +393,7 @@ spec:
ref: ref:
branch: master branch: master
verify: verify:
mode: head mode: HEAD
secretRef: secretRef:
name: pgp-public-keys name: pgp-public-keys
``` ```
@ -978,6 +987,15 @@ status:
... ...
``` ```
### Source Verification Mode
The source-controller reports the Git object(s) it verified in the Git
repository to create an artifact in the GitRepository's
`.status.sourceVerificationMode`. This value is the same as the [verification
mode in spec](#verification). The verification status is applicable only to the
latest Git repository revision used to successfully build and store an
artifact.
### Observed Generation ### Observed Generation
The source-controller reports an [observed generation][typical-status-properties] The source-controller reports an [observed generation][typical-status-properties]