Created
November 7, 2019 22:22
-
-
Save GauntletWizard/e5af979a8814dbd8dcc61bbb8b30abfc 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
| git fetch | |
| for deployment in $(kubectl get deployment -o name) ; do | |
| local sha=$(kubectl get “$deployment” -o json |jq -r '.spec.template.spec.containers[].image | capture(".*:(?<sha>.*)")| .sha’); | |
| count=$(git rev-list --count “${SHA}..origin/master”) ; | |
| echo $deployment is $count revisions behind master (at $sha) | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment