Prow
The prow lexicon declares the job config Prow loads. Every job carries its pod spec and the conditions it runs on. The types are generated from sigs.k8s.io/prow at a pinned commit. Job fields come from Prow’s own Go types, and the pod spec, decoration config and refs come from its ProwJob CRD, so a field Prow does not know is a type error.
import { Presubmit, PodSpec } from "@intentius/chant-lexicon-prow";
export const jobs = [ new Presubmit({ repo: "acme/app", name: "pull-app-unit", always_run: true, decorate: true, branches: ["^main$"], spec: new PodSpec({ automountServiceAccountToken: false, containers: [{ name: "test", image: "golang:1.26", command: ["go", "test", "./..."] }], }), }),];chant build writes one job config file. The repo of a presubmit or
postsubmit is the key the file lists it under, so the built job does not carry
it. Jobs keep the order of an exported array, and each job keeps the order of
its fields. A JobConfig declaration’s header becomes comment lines at
the top. chant import reads an existing job config into these
declarations, and building the import writes the same file.
Checks
Section titled “Checks”Four errors catch what Prow’s config loader refuses. PROW101 is a duplicated
job name and PROW102 a periodic without exactly one schedule. PROW103 is a
kubernetes job with no pod spec, and PROW106 is always_run beside a change
filter. PROW104 warns about a presubmit whose pod reads a Secret, since the
pull request’s code can read it too. PROW105 warns about a presubmit on a build
cluster where other jobs hold a Secret or a cloud identity. PROW001 is a lint
error for a credential written into a job’s environment in source.
At a Glance
Section titled “At a Glance”| Metric | Count |
|---|---|
| Resources | 4 |
| Property types | 18 |
| Services | 4 |
| Intrinsic functions | 0 |
| Pseudo-parameters | 0 |
| Lint rules | 7 |
Lexicon version: 0.124.34
Namespace: Prow
- All Rules — 7 rules
- Serialization — output format details