Skip to content

Commit

Permalink
dokku_image: Detect unchanged docker images (#157)
Browse files Browse the repository at this point in the history
`dokku git:from-image` command exits with a code of `1` if the image is already up to date.
This resulted in `dokku_image` not being idempotent.
  • Loading branch information
blockloop authored Feb 4, 2023
1 parent e7eaeee commit b376657
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/dokku_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def dokku_image(data):
meta[
"error"
] = "Please upgrade to dokku>=0.24.0 in order to use the 'git:from-image' command."
elif "No changes detected, skipping git commit" in str(e.output):
is_error = False
has_changed = False
else:
meta["error"] = str(e.output)
return (is_error, has_changed, meta)
Expand Down

0 comments on commit b376657

Please sign in to comment.