Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions pkg/steps/multi_stage/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,16 @@ func addCliInjector(imagestream string, pod *coreapi.Pod) {
})
pod.Spec.InitContainers = append(pod.Spec.InitContainers, coreapi.Container{
Name: "inject-cli",
Image: fmt.Sprintf("%s:cli", imagestream),
Command: []string{"/bin/cp"},
Args: []string{"/usr/bin/oc", CliMountPath},
Image: fmt.Sprintf("%s:cli-artifacts", imagestream),
Command: []string{"/bin/sh"},
// to allow the oc team to freely upgrade RHEL version shipped in the release,
// We will explicitly request rhel8 version used in CI and
// if we decide to update to newer rhel in CI, you'll need to update
// this line to pick appropriate oc version (i.e. oc.rhel9).
// Additionally, we need to check the existence of path because releases < 4.15 does not have oc.rhel8,
// and we fall back to old path due to backwards compatibility.
// In order to support multi arch oc, just change the arch path (i.e. /usr/share/openshift/linux_arm64/oc.rhel8).
Args: []string{"-c", fmt.Sprintf("if [[ -e /usr/share/openshift/linux_amd64/oc.rhel8 ]]; then /bin/cp /usr/share/openshift/linux_amd64/oc.rhel8 %s; else /bin/cp /usr/bin/oc %s; fi", filepath.Join(CliMountPath, "oc"), CliMountPath)},
VolumeMounts: []coreapi.VolumeMount{{
Name: volumeName,
MountPath: CliMountPath,
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multi-stage/assembled-release-no-injection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ base_images:
namespace: openshift
tag: 'stream9'
cli:
name: "4.13"
name: "4.15"
namespace: ocp
tag: cli
raw_steps:
Expand All @@ -17,7 +17,7 @@ releases:
latest:
integration:
namespace: ocp
name: "4.13"
name: "4.15"
resources:
'*':
requests:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multi-stage/assembled-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ base_images:
namespace: openshift
tag: 'stream9'
cli:
name: "4.13"
name: "4.15"
namespace: ocp
tag: cli
raw_steps:
Expand All @@ -17,7 +17,7 @@ releases:
latest:
integration:
namespace: ocp
name: "4.13"
name: "4.15"
include_built_images: true
resources:
'*':
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multi-stage/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ resources:
cpu: 10m
tag_specification:
namespace: ocp
name: "4.13"
name: "4.15"
releases:
custom:
candidate:
product: okd
version: "4.13"
version: "4.15"
tests:
- as: with-dependencies
steps:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multi-stage/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestMultiStage(t *testing.T) {
env: []string{defaultJobSpec},
success: true,
output: []string{
`Snapshot integration stream into release 4.13.`, `-latest to tag release:latest`,
`Snapshot integration stream into release 4.15.`, `-latest to tag release:latest`,
`verify-releases-latest-cli succeeded`,
},
},
Expand All @@ -202,7 +202,7 @@ func TestMultiStage(t *testing.T) {
env: []string{defaultJobSpec},
success: true,
output: []string{
`Snapshot integration stream into release 4.13.`, `-latest to tag release:latest`,
`Snapshot integration stream into release 4.15.`, `-latest to tag release:latest`,
`verify-releases-latest-cli succeeded`,
},
},
Expand Down