Repository navigation
feat(prow): generate chant's pipeline jobs as Prow jobs (#5189) - #5213
Merged
Merged
Conversation
The prow lexicon gains `generateComponentPipeline` and `generateOpPipeline`. `chant build --components --generate prow` writes the jobs chant generates for a component project as a Prow job config. `chant run --generate prow` writes the scheduled Ops to one. The jobs are keyed by the GitHub repository's owner/name. `--repo` names it, and without the flag chant reads the checkout's origin remote. The plan and the check are presubmits with no credential. The record and the apply on merge are postsubmits that read the token from a Secret. So are the deploy and gated-wave pipelines. A cron Op is a periodic. No job that holds a credential is a presubmit. The PROW104 and PROW105 checks find nothing on the output. An option that would add such a job is refused by name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5189
chant build --components --generate prowwrites the jobs chant generates for a component project as a Prow job config, andchant run --generate prowwrites the scheduled Ops to one. The jobs are keyed by the GitHub repository'sowner/name. It comes from--repowhen given, and from the origin remote otherwise.Each job is the Prow job of the matching kind.
untrusted, with no Secret and no service account.trustedand read the GitHub token from the Secretchant-github-token. These are the merge record, the apply on merge and the stale-notes job, and also the deploy and gated-wave pipelines.A job that holds a credential is never written as a presubmit, so the output has no PROW104 or PROW105 finding. The renderer refuses such a presubmit, and the loop options that would add one are refused by name. The generator's
prowoption moves the clusters and Secrets and names the service accounts.Level 0 is unaffected, since no other generator's output changes.
I ran
just checkon this branch over current main. Eleven tests in files this change does not touch ran over the 5s unit budget under the full run's load, and those five files pass on their own. The other steps pass. The prow lexicon's 109 tests pass, including Prow's strict loader over every generated config.