Skip to content

Instantly share code, notes, and snippets.

@imrehg
Last active November 6, 2018 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imrehg/bea63311e1d2624cd5f52f236f0be7ff to your computer and use it in GitHub Desktop.
Save imrehg/bea63311e1d2624cd5f52f236f0be7ff to your computer and use it in GitHub Desktop.
Delta test
AUTH_TOKEN=
SRC_RELEASE_ID=
DEST_RELEASE_ID=
IMG_SRC=$(curl --silent -H "Authorization: Bearer $AUTH_TOKEN" "https://api.balena-cloud.com/v4/image?\$filter=is_part_of__release/release%20eq%20${SRC_RELEASE_ID}" | jq -r '.d[0].id')
IMG_DEST=$(curl --silent -H "Authorization: Bearer $AUTH_TOKEN" "https://api.balena-cloud.com/v4/image?\$filter=is_part_of__release/release%20eq%20${DEST_RELEASE_ID}" | jq -r '.d[0].id')
echo "Source Image -> Destination Image"
echo "$IMG_SRC -> $IMG_DEST"
curl -i -H "Authorization: Bearer $AUTH_TOKEN" "https://delta.balena-cloud.com/api/v2/delta?src=${IMG_SRC}&dest=${IMG_DEST}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment