mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
Merge pull request #105049 from openshift-cherrypick-robot/cherry-pick-103911-to-enterprise-4.21
[enterprise-4.21] KFLUXMIG-940: oc version change in OCP Jenkins
This commit is contained in:
@@ -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
|
||||
|
||||
15
modules/about-the-openshift-cli-in-jenkins-images.adoc
Normal file
15
modules/about-the-openshift-cli-in-jenkins-images.adoc
Normal file
@@ -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.
|
||||
51
modules/ocp-jenkins-release-oc-client-table.adoc
Normal file
51
modules/ocp-jenkins-release-oc-client-table.adoc
Normal file
@@ -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
|
||||
|===
|
||||
35
modules/specifying-oc-ocp-jenkins-image.adoc
Normal file
35
modules/specifying-oc-ocp-jenkins-image.adoc
Normal file
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
Reference in New Issue
Block a user