Skip to content

Commit

Permalink
e2e: Fix the podman login to OCP internal registry
Browse files Browse the repository at this point in the history
In OCP 4.16, dockercfg secret moved from the form of
"serviceaccount:xyz" to "<token>:xyz".

Use bash left trim operator (`${<variable>#<prefix>}`) to make it
explicit.

Signed-off-by: Andrea Panattoni <[email protected]>
  • Loading branch information
zeeke committed Jul 10, 2024
1 parent c25a4f9 commit 182fbfc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hack/run-e2e-conformance-virtual-ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ echo ${auth} > registry-login.conf
internal_registry="image-registry.openshift-image-registry.svc:5000"
pass=$( jq .\"image-registry.openshift-image-registry.svc:5000\".auth registry-login.conf )
pass=`echo ${pass:1:-1} | base64 -d`
podman login -u serviceaccount -p ${pass:15} $registry --tls-verify=false

# dockercfg password is in the form `<token>:password`. We need to trim the `<token>:` prefix
pass=${pass#"<token>:"}

podman login -u serviceaccount -p ${pass} $registry --tls-verify=false

MAX_RETRIES=20
DELAY_SECONDS=10
Expand Down

0 comments on commit 182fbfc

Please sign in to comment.