Skip to content

Instantly share code, notes, and snippets.

@mgencur
Created April 1, 2020 07:32
Show Gist options
  • Save mgencur/6fcdeed3d523dc60190e12c5071c1a53 to your computer and use it in GitHub Desktop.
Save mgencur/6fcdeed3d523dc60190e12c5071c1a53 to your computer and use it in GitHub Desktop.
oc create route passthrough -n openshift-image-registry image-registry --service=image-registry
registry=$(oc get routes -n openshift-image-registry image-registry -o=jsonpath='{.spec.host}')
# Wait until the route returns 200
wait_while 30 "[[ $(curl -kL -I -X GET https://${registry} 2>/dev/null | head -n 1 | awk '{ print $2 }') != 200 ]]"
oc --config="$KUBECONFIG" policy add-role-to-group system:image-puller system:serviceaccounts -n tkn-kn
sudo podman login --tls-verify=false -u unused -p "$(oc --config=$KUBECONFIG whoami -t)" "$registry"
sudo podman pull --tls-verify=false "$KN_TEKTON_IMAGE"
sudo podman tag "$KN_TEKTON_IMAGE" "${registry}/${KN_E2E_NAMESPACE}/kn:latest"
sudo podman push --tls-verify=false "${registry}/${KN_E2E_NAMESPACE}/kn:latest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment