|
| 1 | += Creating Prow jobs for openshift-docs branches |
| 2 | + |
| 3 | +Use the `add-new-prow-config.sh` script to populate the `$HOME/release/ci-operator/config/openshift/openshift-docs` directory with a new Prow job branch configuration. |
| 4 | +The script uses the `./openshift-openshift-docs-BRANCH.yaml` template file to create the new job config. |
| 5 | +After you create the job config, you run the CI make jobs to create the Prow jobs. |
| 6 | +Then, open a pull request against the link: [email protected]:openshift/release.git[openshift/release] repository to make the Prow job live for that branch. |
| 7 | + |
| 8 | +To add a new job to Prow CI, do the following: |
| 9 | + |
| 10 | +. Install link:https://podman.io/docs/installation[podman]. |
| 11 | + |
| 12 | +. Fork and clone the link: [email protected]:openshift/release.git[openshift/release] repository to `$HOME/release`. |
| 13 | + |
| 14 | +. Create the new branch config by running the `add-new-prow-config.sh` script passing the `$VERSION`, `$BRANCH` and `$DISTROS` variables. |
| 15 | +Open a shell prompt in the `openshift-docs/` directory, and run the script passing in the required variables, for example: |
| 16 | ++ |
| 17 | +[source,terminal] |
| 18 | +---- |
| 19 | +./scripts/prow/add-new-prow-config.sh 4.15 enterprise-4.15 "openshift-enterprise openshift-rosa openshift-dedicated microshift" |
| 20 | +---- |
| 21 | ++ |
| 22 | +[NOTE] |
| 23 | +==== |
| 24 | +Quote multiple distros to include them as a single item in the build config. |
| 25 | +==== |
| 26 | ++ |
| 27 | +The script copies the new job YAML to the ci-operator config folder in the `$HOME/release` directory. |
| 28 | ++ |
| 29 | +[IMPORTANT] |
| 30 | +==== |
| 31 | +`openshift-rosa` and `openshift-osd` distros should be included in main, current, and future enterprise branch builds only. |
| 32 | +When you add a new enterprise branch, remember to remove `openshift-rosa` and `openshift-osd` distros from the most recent enterprise branch. |
| 33 | +
|
| 34 | +For example, when the current version is 4.15, and you create a enterprise-4.16 branch, remove `openshift-rosa` and `openshift-osd` distros from the enterprise-4.15 branch build. |
| 35 | +==== |
| 36 | +
|
| 37 | +. Change to the `$HOME/release` directory and verify that the new build config has been added. For example: |
| 38 | ++ |
| 39 | +[source,text] |
| 40 | +---- |
| 41 | +$HOME/release/ci-operator/config/openshift/openshift-docs/openshift-openshift-docs-enterprise-4.15.yaml |
| 42 | +---- |
| 43 | + |
| 44 | +. Run the following commands from the root of the `$HOME/release` repository to generate the rest of the Prow build configuration: |
| 45 | ++ |
| 46 | +[source,terminal] |
| 47 | +---- |
| 48 | +make prow-config CONTAINER_ENGINE=podman WHAT=openshift/openshift-docs |
| 49 | + |
| 50 | +make CONTAINER_ENGINE=podman ci-operator-config WHAT=openshift/openshift-docs |
| 51 | + |
| 52 | +make jobs CONTAINER_ENGINE=podman WHAT=openshift/openshift-docs |
| 53 | +---- |
| 54 | + |
| 55 | +. Open a PR against the link:https://github.com/openshift/release[openshift/release] `master` branch. |
| 56 | +Ensure that all Prow CI tests pass. Add a `/pj-rehearse` comment in the pull request to verify the new build. |
| 57 | + |
| 58 | +. Get an `/lgtm` approval from someone in the openshift-docs link:https://github.com/openshift/release/blob/master/ci-operator/config/openshift/openshift-docs/OWNERS[OWNERS] file. |
| 59 | + |
| 60 | +. When you want to schedule the job for merge, add a `/pj-rehearse ack` comment to the pull request. |
| 61 | +The PR is merged automatically when all required approvals are provided and the PR passes all the required CI jobs. |
| 62 | +When the PR is merged, the job goes live on the relevant openshift-docs branch PRs. |
| 63 | ++ |
| 64 | +[NOTE] |
| 65 | +==== |
| 66 | +Rebase often on the release branch when you open a pull request. |
| 67 | +The repository is very busy and the underlying infrastructure changes daily. |
| 68 | +Every time you rebase, rerun the CI make jobs. |
| 69 | +==== |
| 70 | + |
| 71 | +For more information, see: link:https://docs.ci.openshift.org/docs/how-tos/contributing-openshift-release/[Contributing CI configuration to the openshift/release repository] |
0 commit comments