Created
July 28, 2020 21:25
-
-
Save csrwng/b984c687a67821067d959daba8395895 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
oc registry login | |
CI_PULL_SECRET="$(cat ~/.docker/config.json | jq -r '.auths["registry.svc.ci.openshift.org"].auth')" | |
EXISTING="$(cat ~/.pull-secret)" | |
NEW="$(echo "${EXISTING}" | jq --arg a "${CI_PULL_SECRET}" -c '.auths["registry.svc.ci.openshift.org"].auth = $a')" | |
echo "${NEW}" > ~/.pull-secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment