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
8 changes: 6 additions & 2 deletions test/extended/builds/s2i_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package builds

import (
"context"
"fmt"
"github.com/openshift/origin/test/extended/util/image"

g "github.com/onsi/ginkgo"
o "github.com/onsi/gomega"
Expand Down Expand Up @@ -35,7 +37,8 @@ var _ = g.Describe("[sig-builds][Feature:Builds] s2i build with a root user imag
Before(oc)
defer After(oc)

err := oc.Run("new-app").Args("docker.io/openshift/test-build-roots2i~https://github.com/sclorg/nodejs-ex", "--name", "nodejsfail").Execute()
firstArgString := fmt.Sprintf("%s~https://github.com/sclorg/nodejs-ex", image.LocationFor("registry.svc.ci.openshift.org/ocp/4.7:test-build-roots2i"))
err := oc.Run("new-app").Args(firstArgString, "--name", "nodejsfail").Execute()
o.Expect(err).NotTo(o.HaveOccurred())

err = exutil.WaitForABuild(oc.BuildClient().BuildV1().Builds(oc.Namespace()), "nodejsfail-1", nil, nil, nil)
Expand Down Expand Up @@ -111,7 +114,8 @@ var _ = g.Describe("[sig-builds][Feature:Builds] s2i build with a root user imag
roleBinding, err = oc.AdminKubeClient().RbacV1().RoleBindings(oc.Namespace()).Create(context.Background(), roleBinding, metav1.CreateOptions{})
o.Expect(err).NotTo(o.HaveOccurred())

err = oc.Run("new-build").Args("docker.io/openshift/test-build-roots2i~https://github.com/sclorg/nodejs-ex", "--name", "nodejspass").Execute()
firstArgString := fmt.Sprintf("%s~https://github.com/sclorg/nodejs-ex", image.LocationFor("registry.svc.ci.openshift.org/ocp/4.7:test-build-roots2i"))
err = oc.Run("new-build").Args(firstArgString, "--name", "nodejspass").Execute()
o.Expect(err).NotTo(o.HaveOccurred())

err = exutil.WaitForABuild(oc.BuildClient().BuildV1().Builds(oc.Namespace()), "nodejspass-1", nil, nil, nil)
Expand Down
4 changes: 4 additions & 0 deletions test/extended/util/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ func init() {
// used by oc mirror test, should be moved to publish to quay
"docker.io/library/registry:2.7.1": -1,

// used by build s2i e2e's to verify that builder with USER root are not allowed
// the github.com/openshift/build-test-images repo is built out of github.com/openshift/release
"registry.svc.ci.openshift.org/ocp/4.7:test-build-roots2i": -1,

// moved to GCR
"k8s.gcr.io/sig-storage/csi-attacher:v2.2.0": -1,
"k8s.gcr.io/sig-storage/csi-attacher:v3.0.0": -1,
Expand Down
1 change: 1 addition & 0 deletions test/extended/util/image/zz_generated.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ k8s.gcr.io/sig-storage/livenessprobe:v1.1.0 quay.io/openshift/community-e2e-imag
k8s.gcr.io/sig-storage/mock-driver:v3.1.0 quay.io/openshift/community-e2e-images:e2e-k8s-gcr-io-sig-storage-mock-driver-v3-1-0-PWpfweH52dPLzByS
k8s.gcr.io/sig-storage/nfs-provisioner:v2.2.2 quay.io/openshift/community-e2e-images:e2e-22-k8s-gcr-io-sig-storage-nfs-provisioner-v2-2-2-dbgtOCwYmEGggl01
k8s.gcr.io/sig-storage/snapshot-controller:v2.1.1 quay.io/openshift/community-e2e-images:e2e-k8s-gcr-io-sig-storage-snapshot-controller-v2-1-1-n5BM_jX2npV3RxHM
registry.svc.ci.openshift.org/ocp/4.7:test-build-roots2i quay.io/openshift/community-e2e-images:e2e-registry-svc-ci-openshift-org-ocp-4-7-test-build-roots2i-ZzDWhWn0wPB9cLFM