appleboy / drone-sftp-cache

Drone plugin for caching artifacts to a central server using sftp
Apache License 2.0
14 stars 10 forks source link

Support ignore branch name on hash value. #12

Closed appleboy closed 8 years ago

appleboy commented 8 years ago

Warring: The default behavior is create different cache files from each commit branch.

Add ignore_branch flag to ignore commit branch name on hash value.

for example:

ignore_branch is false (default setting). Two commit branch will generate different name of cache file.

ignore_branch is true. Any commit branch will generate same name of cache file.

cc @tboerger

Signed-off-by: Bo-Yi Wu appleboy.tw@gmail.com

tboerger commented 8 years ago

Should we also document it with a big warning?

appleboy commented 8 years ago

@tboerger I updated document.

tboerger commented 8 years ago

Should we add a big warning for pull requests?

appleboy commented 8 years ago

@tboerger Please help to review document. https://github.com/drone-plugins/drone-sftp-cache/pull/12/commits/3e0956b1f3ab4d74ca208cf90d443cb8189bbed3

appleboy commented 8 years ago

@tboerger What do you meant about security warning?

bradrydzewski commented 8 years ago

I recommend forking the plugin if you need to modify the default behavior. This plugin is meant as a reference plugin for individuals that want to fork and create their cache process, as opposed to handle all use cases.

appleboy commented 8 years ago

@bradrydzewski This PR reserve the default behavior and add new flag to store the same file name for all branch. If developer create 1000 branchs, the default behavior will create 1000 different cache files.