file-delete¶
Shortcut: fd
Help option
~ $ dk file-delete --help
Current context is: default
Delete one or more Recipe files. If you are not in a recipe path, provide
the file paths relative to the recipe root. Separate multiple file paths
with spaces. File paths need no preceding backslash.
To delete the directory, delete all files in that directory and then the
directory will automatically be deleted.
Example...
dk file-delete -m "my delete message" file1.json dir2/file2.json
Options:
-k, --kitchen TEXT kitchen name
-r, --recipe TEXT recipe name
-m, --message TEXT change message [required]
--help Show this message and exit.
Delete multiple files using contextual options
~/Kitchens/Dev_Sprint/Demo_Recipe $ dk file-delete --message "Change message." file1.json resources/file2.sql node1/file3.json
Current context is: default
YYYY-MM-DD HH:MM:SS - Deleting ((u'file1.json', u'resources/file2.sql')) in
Recipe (Recipe1) in kitchen(Feature_Sprint) with message (Change message)
DKCloudCommand.delete_file for file1.json succeed on local delete
DKCloudCommand.delete_file for file1.json succeed on remote delete
DKCloudCommand.delete_file for resources/file2.sql succeed on local delete
DKCloudCommand.delete_file for resources/file2.sql succeed on remote delete
Delete a file using explicit options and shortcuts
~ $ dk fd -k Feature_Sprint -r Recipe1 -m "Change message" file1.json
Current context is: default
YYYY-MM-DD HH:MM:SS - Deleting ((u'file1.json',)) in Recipe (Recipe1) in
kitchen(Feature_Sprint) with message (Change message)
DKCloudCommand.delete_file for file1.json succeed on local delete
DKCloudCommand.delete_file for file1.json succeed on remote delete