Payload Testing
TRT needs the capability to run a selected subset of release qualification jobs on selected pull requests in all repositories that contribute to OCP, before they are merged.
The PullRequestPayloadQualificationRun
CRD and the /payload
command is provided for this purpose.
Usage
Payload Command
Any collaborator of the GitHub OpenShift organization can issue the command on a pull request to a branch of a repository of the organization that contributes to OpenShift official images:
/payload <ocp_version> <ci|nightly> <informing|blocking>
For example, if /payload 4.10 nightly informing
is issued on a PR, the robot will reply the list of the triggered jobs:
The jobs triggered by the command are determined by OpenShift Release Controllers. The linked page from payload-tests portal at the bottom of the comment shows the status of the payload testing and the details of those jobs.
The images from multiple PRs can also be included in the payload tested by using the /payload-with-prs
command, such as
/payload-with-prs <ocp_version> <ci|nightly> <informing|blocking> <org/repo#number> [<org/repo#number …]
A particular job or set of jobs can be triggered by /payload-job
, such as
/payload-job <periodic_ci_openshift_release_some_job> <periodic_ci_openshift_release_another_job>
The payload tested can also include the images from multiple PRs by using /payload-job-with-prs
, such as
/payload-job-with-prs <periodic_ci_openshift_release_some_job> <org/repo#number> [<org/repo#number …]
A job can be executed more than once by a single /payload-aggregate
command, e.g,
/payload-aggregate <periodic_ci_openshift_release_some_job> <aggregated_count>
It is also possible to use the aggregation logic with additional PRs included in the payload with the /payload-aggregate-with-prs
command, e.g,
/payload-aggregate-with-prs <periodic_ci_openshift_release_some_job> <aggregated_count> <org/repo#number> [<org/repo#number …]
NOTE
/payload-with-prs
, /payload-aggregate
, /payload-aggregate-with-prs
, and /payload-job-with-prs
only accept a single command per comment; additional commands need to be triggered with separate comments (not just separate lines).Abort all Payload Jobs
It is possible to quickly abort all running payload jobs for a specific PR. Simply comment /payload-abort
on the PR to do so.
Manually Submitting a PRPQR
It is also possible to manually create a PullRequestPayloadQualificationRun
instance without using the payload
command.
This allows for additional options to be supplied that are currently not possible via the command.
The following is an example of a full PRPQR
CR that can be applied to the app.ci
cluster to trigger a payload job:
|
|
WARNING
If multiplepullRequests
entries are supplied for a single org/repo pair, the baseRef
and baseSHA
will be selected only from the first one in the list.
Therefore, it is not supported to have differing entries for these.Supplying Multiple PRs from Component Repositories
The ci-operator
can assemble a release payload by building and using images from multiple PRs in OCP component repos.
In order to do this, refs for each PR must be provided in the PRPQR
spec:
|
|
Overriding the Default Payload PullSpecs
It is possible to override the pull-spec used for both the initial
and latest
release payloads by manually submitting a PRPQR
.
This is done by supplying the spec.initial
and spec.payload.base
fields respectively:
|
|
Overriding Specific Image Tags in the Payload
It is also possible to override a specific image tag in the payload to any tag contained in an ocp
ImageStream. Doing so requires manually submitting a PRPQR
.
This can be done by providing the tag overrides in the spec.payload.tags
list:
Sourcing Components from Specific Base
A PRPQR
can be submitted without referencing an open PR. This is useful to pin one or more component repos to a specific baseRef
and baseSHA
in order to test the state of things at that point.
Doing so requires manually applying the PRPQR
CR: