Skip to content
Open
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 utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1026,10 +1026,14 @@ function write_pull_secret() {
_tmpfiles="$_tmpfiles $tmppullsecret"
# Pull secret for registry.ci.openshift.org (auto-discovered from the cluster)
oc registry login --kubeconfig="$tmpkubeconfig" --to="$tmppullsecret"
# Pull secret for quay-proxy.ci.openshift.org
# Pull secret for quay-proxy.ci.openshift.org.
# Replace ':' in the username: oc whoami for a ServiceAccount returns
# system:serviceaccount:..., which breaks HTTP Basic Auth on quay-proxy.
# Humans (Rover) keep a usable whoami; SAs become colon-free.
# Docs: https://docs.ci.openshift.org/how-tos/use-registries-in-build-farm/
oc --kubeconfig="$tmpkubeconfig" whoami -t | \
podman login "${CI_REGISTRY}" \
--username "$(oc --kubeconfig="$tmpkubeconfig" whoami)" \
--username "$(oc --kubeconfig="$tmpkubeconfig" whoami | tr ':' '_')" \
--password-stdin \
--authfile "$tmppullsecret"

Expand Down