mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
feat: add porcelain output (#1337)
* feat: add porcaline output * feat(du-cli): add create-stale action add create-stale action Signed-off-by: nils måsén * test(flags): add alias tests * fix stray format string ref * fix shell liniting problems * feat(du-cli): remove created images * add test for common template * fix interval/schedule logic * use porcelain arg as template version * fix editor save artifacts * use simpler v1 template Signed-off-by: nils måsén
This commit is contained in:
parent
a429c373ff
commit
7900471f88
13 changed files with 344 additions and 63 deletions
27
scripts/du-cli.sh
Normal file → Executable file
27
scripts/du-cli.sh
Normal file → Executable file
|
|
@ -16,7 +16,7 @@ case $1 in
|
|||
registry-host
|
||||
;;
|
||||
*)
|
||||
echo "Unknown keyword \"$2\""
|
||||
echo "Unknown registry action \"$2\""
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
@ -28,8 +28,11 @@ case $1 in
|
|||
latest)
|
||||
latest-image-rev "$3"
|
||||
;;
|
||||
rm)
|
||||
remove-repo-images "$3"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown keyword \"$2\""
|
||||
echo "Unknown image action \"$2\""
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
@ -47,8 +50,26 @@ case $1 in
|
|||
started)
|
||||
container-started "$3"
|
||||
;;
|
||||
create)
|
||||
create-container "${@:3:2}"
|
||||
;;
|
||||
create-stale)
|
||||
if [ -z "$3" ]; then
|
||||
echo "NAME missing"
|
||||
exit 1
|
||||
fi
|
||||
if ! registry-exists; then
|
||||
echo "Registry container missing! Creating..."
|
||||
start-registry || exit 1
|
||||
fi
|
||||
image_name="images/$3"
|
||||
container_name=$3
|
||||
$0 image rev "$image_name" || exit 1
|
||||
$0 container create "$container_name" "$image_name" || exit 1
|
||||
$0 image rev "$image_name" || exit 1
|
||||
;;
|
||||
*)
|
||||
echo "Unknown keyword \"$2\""
|
||||
echo "Unknown container action \"$2\""
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue