Create a Build cluster to host your prow jobs using create_build_cluster.sh
.
It isn't necessary to use a separate build cluster for every individual repo, but each team should use their own cluster for workload/billing isolation and management.
Install prow GitHub app at https://github.com/apps/google-oss-prow/installations/new. Once the installation is completed, the org/repo will start sending webhook to prow, but nothing will happen until after following steps.
This step is required only with private repos that want a private UI. For detailed check out Private deck instruction.
Create a pullrequest, contains:
- Setup tide to help automatically merging PRs.
- Enable the
trigger
plugin to allow presubmit and postsubmit ProwJobs to be triggered. - Enable other useful plugins.
We have catalogs of the available plugins and commands to browse through.
If not sure what setting or which plugins to use, feel free to just start with the
same set of settings for google/exposure-notification-server
in
Prow config example PR.
The documented Prow config is a useful reference for config fields.
After this step, prow is capable of reacting with /
style command such as:
/lgtm
: addlgtm
label on PR./hold
: adddo-not-merge/hold
label on PR./retest
: rerun presubmit jobs that failed.
Tide will also start automatically merging PRs in your org/repo when
conditions are met, in the google/exposure-notification-server
example above
these conditions are:
- CLA signed.
- PR contains
lgtm
andapprove
label.
To make prow/tide require presubmit tests to pass, proceed with Adding Prow jobs
below.
Create a pullrequest, contains:
- Add a directory named
<your_org>/<your_repo>
underprow/prowjobs
in oss prow repo. - Add an
OWNERS
file under<your_org>
or<your_org>/<your_repo>
directory, which contains members from your team. - Add prowjobs under
<your_org>/<your_repo>
in uniquely named.yaml
files. File names must be unique across the Prow instance so it is advised to include the repo in the file name. e.g.gcp-oss-test-infra-presubmits.yaml
Check the prow job example pr for ideas.
Tip: If you want to know more about how to configure your job, please reference to How to add new jobs and Pod-utilities.
This step is only required when the target repo(s) can not be cloned anonymously.
There are two options for creating ssh key:
- (Recommended) deploy-keys. Deploy keys are associated with repo instead of personal account, which is much easier to manage. The drawback is that one key only works with a single repo.
- (For many repos) personal ssh key. This key can be used to clone any repo that the owner of the key can clone.
Follow set up ssh key for cloning for integrating with prow jobs.
There are a few ways that you can test changes to your ProwJobs, check out Testing prow jobs for more information.
To view all test results please navigate to https://oss.gprow.dev. Presubmit and postsubmit jobs will also report to GitHub by default.