build: generate the local build tag with docker io
The docker.io image prefix is expected to be prepended
to the image names in the test images. This was missed
in 14550 related to some CI tests, which was now causing
the CI failures in the 1.15 branch where the search and
replace was missing the new docker.io prefix.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 3045076db8)
This commit is contained in:
3 files changed
+6
-6
No files matched your search
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/rook/rook/tests/framework/utils"
|
||||
)
|
||||
|
||||
var imageMatch = regexp.MustCompile(`image: rook\/ceph:[a-z0-9.-]+`)
|
||||
var imageMatch = regexp.MustCompile(`image: docker.io/rook\/ceph:[a-z0-9.-]+`)
|
||||
|
||||
func readManifest(filename string) string {
|
||||
rootDir, err := utils.FindRookRoot()
|
||||
@@ -39,7 +39,7 @@ func readManifest(filename string) string {
|
||||
if err != nil {
|
||||
panic(errors.Wrapf(err, "failed to read manifest at %s", manifest))
|
||||
}
|
||||
return imageMatch.ReplaceAllString(string(contents), "image: rook/ceph:"+LocalBuildTag)
|
||||
return imageMatch.ReplaceAllString(string(contents), "image: docker.io/rook/ceph:"+LocalBuildTag)
|
||||
}
|
||||
|
||||
func buildURL(rookVersion, filename string) string {
|
||||
|
||||
@@ -380,7 +380,7 @@ func (s *UpgradeSuite) verifyOperatorImage(expectedImage string) {
|
||||
// verify that the operator spec is updated
|
||||
version, err := k8sutil.GetDeploymentImage(context.TODO(), s.k8sh.Clientset, systemNamespace, operatorContainer, operatorContainer)
|
||||
assert.NoError(s.T(), err)
|
||||
assert.Contains(s.T(), version, "rook/ceph:"+expectedImage)
|
||||
assert.Contains(s.T(), "docker.io/rook/ceph:"+expectedImage, version)
|
||||
}
|
||||
|
||||
func (s *UpgradeSuite) verifyRookUpgrade(numOSDs int) {
|
||||
|
||||
@@ -204,7 +204,7 @@ function build_rook() {
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
if [[ "$build_type" == "build" ]]; then
|
||||
docker tag "$(docker images | awk '/build-/ {print $1}')" rook/ceph:local-build
|
||||
docker tag "$(docker images | awk '/build-/ {print $1}')" docker.io/rook/ceph:local-build
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ function create_cluster_prerequisites() {
|
||||
function deploy_manifest_with_local_build() {
|
||||
sed -i 's/.*ROOK_CSI_ENABLE_NFS:.*/ ROOK_CSI_ENABLE_NFS: \"true\"/g' $1
|
||||
if [[ "$USE_LOCAL_BUILD" != "false" ]]; then
|
||||
sed -i "s|image: rook/ceph:.*|image: rook/ceph:local-build|g" $1
|
||||
sed -i "s|image: docker.io/rook/ceph:.*|image: docker.io/rook/ceph:local-build|g" $1
|
||||
fi
|
||||
if [[ "$ALLOW_LOOP_DEVICES" = "true" ]]; then
|
||||
sed -i "s|ROOK_CEPH_ALLOW_LOOP_DEVICES: \"false\"|ROOK_CEPH_ALLOW_LOOP_DEVICES: \"true\"|g" $1
|
||||
@@ -640,7 +640,7 @@ function test_multus_connections() {
|
||||
|
||||
function create_operator_toolbox() {
|
||||
cd deploy/examples
|
||||
sed -i "s|image: rook/ceph:.*|image: rook/ceph:local-build|g" toolbox-operator-image.yaml
|
||||
sed -i "s|image: docker.io/rook/ceph:.*|image: docker.io/rook/ceph:local-build|g" toolbox-operator-image.yaml
|
||||
kubectl create -f toolbox-operator-image.yaml
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user