Skip to content

Commit

Permalink
ocm: update image mirror in step registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-harris committed Mar 7, 2022
1 parent f91f429 commit 5c21abc
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ base64 -d < "$REGISTRY_TOKEN_FILE" > "$config_file" || {
exit 1
}

password_file="$HOME/.docker/password"
jq -r ".\"$REGISTRY_HOST\".password" > "$password_file" || {
log "ERROR Could not extract registry password from config file"
log " From: $config_file"
log " To : $password_file"
exit 1
}

docker login -u serviceaccount --password-stdin < "$password_file" || {
log "ERROR Could not log in to registry"
exit 1
}

# Build destination image reference
DESTINATION_IMAGE_REF="$REGISTRY_HOST/$REGISTRY_ORG/$IMAGE_REPO:$IMAGE_TAG"

Expand Down

0 comments on commit 5c21abc

Please sign in to comment.