Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@imjasonh
Last active October 28, 2021 05:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save imjasonh/2a8ca3bc2f4be055af99ac9936de5346 to your computer and use it in GitHub Desktop.
Save imjasonh/2a8ca3bc2f4be055af99ac9936de5346 to your computer and use it in GitHub Desktop.
$ cat cfg1.json cfg2.json
{
"auths": {
"registry.a": {
"auth": "base64junk-a"
},
"registry.b": {
"auth": "base64junk-b"
}
}
}
{
"auths": {
"registry.c": {
"auth": "base64junk-c"
},
"registry.b": {
"auth": "base64junk-NEW"
}
},
"credHelpers": {
"asia.gcr.io": "gcloud",
"eu.gcr.io": "gcloud",
"gcr.io": "gcloud"
}
}
$ jq -s '.[0] * .[1]' cfg1.json cfg2.json
{
"auths": {
"registry.a": {
"auth": "base64junk-a"
},
"registry.b": {
"auth": "base64junk-NEW"
},
"registry.c": {
"auth": "base64junk-c"
}
},
"credHelpers": {
"asia.gcr.io": "gcloud",
"eu.gcr.io": "gcloud",
"gcr.io": "gcloud"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment