Skip to content

Commit 8309778

Browse files
Merge pull request #369 from perdasilva/fix_ups
noqe: script fixes
2 parents 7cb89a5 + 92bd21a commit 8309778

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

scripts/crc-deploy.sh

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,26 @@ function push_images {
1919
# push images to the global crc registry "openshift"
2020
# so that they can be pulled from any other namespace in the cluster
2121
CRC_GLOBAL_REGISTRY="openshift"
22+
CRC_REGISTRY="default-route-openshift-image-registry.apps-crc.testing"
2223

2324
# CRC destined images
24-
CRC_OLM_IMAGE="localhost:5000/${CRC_GLOBAL_REGISTRY}/olm:test"
25-
CRC_OPM_IMAGE="localhost:5000/${CRC_GLOBAL_REGISTRY}/opm:test"
25+
CRC_OLM_IMAGE="${CRC_REGISTRY}/${CRC_GLOBAL_REGISTRY}/olm:test"
26+
CRC_OPM_IMAGE="${CRC_REGISTRY}/${CRC_GLOBAL_REGISTRY}/opm:test"
2627

2728
# CRC registry coordinates
28-
OPENSHIFT_REGISTRY_NAMESPACE="openshift-image-registry"
2929
OLM_NAMESPACE="openshift-operator-lifecycle-manager"
30-
IMAGE_REGISTRY_SVC="image-registry"
31-
IMAGE_REGISTRY_PORT=5000
3230

33-
# Create port-forward to CRC registry
34-
kubectl port-forward -n ${OPENSHIFT_REGISTRY_NAMESPACE} svc/${IMAGE_REGISTRY_SVC} ${IMAGE_REGISTRY_PORT}:${IMAGE_REGISTRY_PORT} > /dev/null 2>&1 &
35-
PORT_FWD_PID=$!
31+
# Copy OCP docker registry certificate
32+
echo "need sudo to copy OCP certificate to docker configuration"
33+
rm -rf tls.crt
34+
oc extract secret/router-ca --keys=tls.crt -n openshift-ingress-operator
35+
sudo mkdir -p /etc/docker/certs.d/default-route-openshift-image-registry.apps-crc.testing/
36+
sudo mv tls.crt /etc/docker/certs.d/default-route-openshift-image-registry.apps-crc.testing/tls.crt
3637

37-
# Remember to close the port-forward
38-
trap 'kill "${PORT_FWD_PID}"' EXIT
3938

40-
# give port-forward a second
41-
# I found that without this docker login would not work
42-
# as if it couldn't reach the docker server
43-
sleep 1
4439

4540
# Login to the CRC registry
46-
oc whoami -t | docker login localhost:5000 --username user --password-stdin
41+
oc whoami -t | docker login "${CRC_REGISTRY}" --username user --password-stdin
4742

4843
# Tag and push olm image
4944
echo "Pushing olm image"
@@ -190,4 +185,4 @@ fi
190185

191186
echo "Done"
192187

193-
exit 0
188+
exit 0

scripts/sync_pop_candidate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ done
2222
set -u
2323

2424
remote="${1:-api}"
25-
subtree_dir="staging/${remote}"
25+
subtree_dir="staging/${2:-${remote}}"
2626
cherrypick_set="${remote}.cherrypick"
2727
remaining=$(wc -l < "${cherrypick_set}")
2828

0 commit comments

Comments
 (0)