Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
#
# Fetch DO registry credentials and set them in Convox
doctl_path=$(which doctl)
convox_path=$(which convox)
if [ ! -x "$doctl_path" ] || [ ! -x "$convox_path" ]; then
echo "'doctl' and 'convox' CLIs must be installed to run this script."
fi
echo "Fetching DO registry credentials..."
do_registry_token=$(doctl registry --context chatterbug kubernetes-manifest | yq -r '.data[".dockerconfigjson"]' | base64 -d | jq -r '.auths["registry.digitalocean.com"].auth' | base64 -d | cut -d: -f1)
convox registries add registry.digitalocean.com $do_registry_token $do_registry_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.