Skip to content

Commit

Permalink
Make correct CLI image available for tests and check in e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Dec 24, 2018
1 parent 247301f commit 669fde2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion images/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ RUN INSTALL_PKGS="origin-clients" && \
yum --enablerepo=origin-local-release install -y ${INSTALL_PKGS} && \
rpm -V ${INSTALL_PKGS} && \
yum clean all
COPY manifests /manifests

LABEL io.k8s.display-name="OpenShift Client" \
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
io.openshift.tags="openshift,cli"
io.openshift.tags="openshift,cli" \
io.openshift.release.operator="true"
11 changes: 11 additions & 0 deletions images/cli/manifests/01_imagestream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
namespace: openshift
name: cli
spec:
tags:
- name: latest
from:
kind: DockerImage
name: docker.io/openshift/origin-cli:v4.0
8 changes: 8 additions & 0 deletions images/cli/manifests/image-references
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: ImageStream
apiVersion: image.openshift.io/v1
spec:
tags:
- name: cli
from:
kind: DockerImage
name: docker.io/openshift/origin-cli:v4.0
9 changes: 9 additions & 0 deletions test/extended/util/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,15 @@ func GetRouterPodTemplate(oc *CLI) (*corev1.PodTemplateSpec, string, error) {
}

func FindImageFormatString(oc *CLI) (string, bool) {
// look up image stream
is, err := oc.AdminImageClient().ImageV1().ImageStreams("openshift").Get("cli", metav1.GetOptions{})
if err == nil {
for _, tag := range is.Spec.Tags {
if tag.Name == "latest" && tag.From != nil && tag.From.Kind == "DockerImage" {
return tag.From.Name, true
}
}
}
// the router is expected to be on all clusters
// TODO: switch this to read from the global config
template, _, err := GetRouterPodTemplate(oc)
Expand Down

0 comments on commit 669fde2

Please sign in to comment.