Skip to content

Commit

Permalink
Fix Openshift test:
Browse files Browse the repository at this point in the history
* Allow select Openshift version
* Load Operator image from local build instead of remote registry

Signed-off-by: pjuarezd <[email protected]>
  • Loading branch information
pjuarezd committed Aug 5, 2023
1 parent c1b6aac commit 8db3654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ function main() {

create_marketplace_catalog "certified-operators"

install_operator "certified-operators" # "community-operators", "redhat-marketplace"
install_operator "certified-operators"

# install_operator
# install_tenant
# check_tenant_status tenant-lite myminio

#destroy_crc
}

Expand Down
4 changes: 3 additions & 1 deletion testing/openshift-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ yell() { echo "$0: $*" >&2; }

die() {
yell "$*"
destroy_crc && exit 111
exit 111
}

try() { "$@" || die "cannot $*"; }
Expand Down Expand Up @@ -168,6 +168,8 @@ function create_marketplace_catalog(){
echo "Compiling operator bundle for $catalog"
cp -r "${SCRIPT_DIR}/../$catalog/." ${SCRIPT_DIR}/openshift/bundle
yq -i ".metadata.annotations.containerImage |= (\"${operatorContainerImage}\")" ${SCRIPT_DIR}/openshift/bundle/manifests/$package.clusterserviceversion.yaml
yq -i ".spec.install.spec.deployments.[0].spec.template.spec.containers.[0].image |= (\"${operatorContainerImage}\")" ${SCRIPT_DIR}/openshift/bundle/manifests/$package.clusterserviceversion.yaml
yq -i ".spec.install.spec.deployments.[1].spec.template.spec.containers.[0].image |= (\"${operatorContainerImage}\")" ${SCRIPT_DIR}/openshift/bundle/manifests/$package.clusterserviceversion.yaml
yq -i ".annotations.\"operators.operatorframework.io.bundle.package.v1\" |= (\"${package}-noop\")" ${SCRIPT_DIR}/openshift/bundle/metadata/annotations.yaml
(cd "${SCRIPT_DIR}/.." && podman build --quiet --no-cache -t $bundleContainerImage -f ${SCRIPT_DIR}/openshift/bundle.Dockerfile ${SCRIPT_DIR}/openshift)
podman login -u `oc whoami` -p `oc whoami --show-token` $registry --tls-verify=false
Expand Down

0 comments on commit 8db3654

Please sign in to comment.