diff --git a/cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc b/cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc index 067ad86f9f..b1f917647f 100644 --- a/cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc +++ b/cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc @@ -29,6 +29,12 @@ include::modules/relocation-of-openshift-jenkins-images.adoc[leveloffset=+1] include::modules/customizing-the-jenkins-image-stream-tag.adoc[leveloffset=+1] +include::modules/about-the-openshift-cli-in-jenkins-images.adoc[leveloffset=+1] + +include::modules/ocp-jenkins-release-oc-client-table.adoc[leveloffset=+1] + +include::modules/specifying-oc-ocp-jenkins-image.adoc[leveloffset=+1] + [role="_additional-resources"] [id="additional-resources_important-changes-to-openshift-jenkins-images_{context}"] == Additional resources diff --git a/modules/about-the-openshift-cli-in-jenkins-images.adoc b/modules/about-the-openshift-cli-in-jenkins-images.adoc new file mode 100644 index 0000000000..c7fd7ee1cf --- /dev/null +++ b/modules/about-the-openshift-cli-in-jenkins-images.adoc @@ -0,0 +1,15 @@ +// Module included in the following assemblies: +// +// * cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc + +:_mod-docs-content-type: CONCEPT + +[id="about-the-openshift-cli-in-jenkins-images_{context}"] += About the OpenShift CLI tool in OpenShift Jenkins images + +[role="_abstract"] +If your Jenkins pipelines require a *specific* {oc-first} version for compatibility or reproducibility, you must explicitly configure the desired client version in the Jenkins pipeline DSL. + +Starting with 4.12, the OpenShift Jenkins container images ship with the *latest available version* of the `oc` CLI tool bundled inside the image, rather than the client version matching the cluster release. + +If your Jenkins pipelines require a *specific* `oc` client version for compatibility or reproducibility, you must explicitly configure the desired client version in the Jenkins pipeline DSL. diff --git a/modules/ocp-jenkins-release-oc-client-table.adoc b/modules/ocp-jenkins-release-oc-client-table.adoc new file mode 100644 index 0000000000..a761913f9e --- /dev/null +++ b/modules/ocp-jenkins-release-oc-client-table.adoc @@ -0,0 +1,51 @@ +// Module included in the following assemblies: +// +// * cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc + +:_mod-docs-content-type: REFERENCE +[id="ocp-jenkins-release-oc-client-table_{context}"] += OpenShift Jenkins release compared to bundled `oc` client version table + +[role="_abstract"] +Use the following table to understand which version of {oc-first} is shipped with your OpenShift Jenkins images. + +[cols="3,3,4",options="header"] +|=== +| OpenShift Jenkins release | Default `oc` version | Bundled `oc` version + +| 4.12 +| 4.13 +| 4.12, 4.13 + +| 4.13 +| 4.13 +| 4.12, 4.13 + +| 4.14 +| 4.15 +| 4.14, 4.15 + +| 4.15 +| 4.15 +| 4.14, 4.15 + +| 4.16 +| 4.20 +| 4.16, 4.17, 4.18, 4.19, 4.20 + +| 4.17 +| 4.20 +| 4.16, 4.17, 4.18, 4.19, 4.20 + +| 4.18 +| 4.20 +| 4.16, 4.17, 4.18, 4.19, 4.20 + +| 4.19 +| 4.20 +| 4.16, 4.17, 4.18, 4.19, 4.20 + +| 4.20 +| 4.20 +| 4.16, 4.17, 4.18, 4.19, 4.20 +|=== diff --git a/modules/specifying-oc-ocp-jenkins-image.adoc b/modules/specifying-oc-ocp-jenkins-image.adoc new file mode 100644 index 0000000000..f847559820 --- /dev/null +++ b/modules/specifying-oc-ocp-jenkins-image.adoc @@ -0,0 +1,35 @@ +// Module included in the following assemblies: +// +// * cicd/jenkins/important-changes-to-openshift-jenkins-images.adoc + +:_mod-docs-content-type: PROCEDURE +[id="specifying-oc-ocp-jenkins-image_{context}"] += Specifying a fixed `oc` client version for OpenShift Jenkins images + +[role="_abstract"] +You can ensure that your Jenkins pipeline uses your specified `oc` client version with the Jenkins container image by configuring the version you require. + +.Procedure + +* Define the `oc` tool version explicitly in the pipeline configuration to use a specific OpenShift client version in a Jenkins pipeline as shown in the following example: + +.Example pipeline configuration: + +[source,terminal,subs="attributes+"] +---- +pipeline { + agent any + + tools { + oc 'oc-{product-version}' + } + + stages { + stage('Version') { + steps { + sh 'oc version' + } + } + } +} +----