Unable to remove/delete files when deploying from file system?


#1

Sorry if this has been asked a lot, but I just realized deploying changes out of the file system (instead of the Git repo) doesn’t sync removed files.

For example, I’ve deployed some files to an S3 bucket in my pipeline. If I delete one of those files from the repo that deletion isn’t played on the S3 and the file remains. I don’t think I can rely on deploying from the Git repo because we want our build process to compress these images before sending it to the server.

How are people working around this? Struggling on how to get this working when files we deploy are modified from a build process in the pipeline.


#2

@aaronbushnell, I’m pasting the same response we’ve sent to Jon via chat in app:

The thing is that if you choose the deployment from the filesystem, the files won’t be removed.
However, if you really want to have these files deleted, you can use the AWS CLI action and run aws s3 sync command, for instance.

Here you can find more info: http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html


#3

Thanks, @Octavia! I’ll look into this for working with the S3. What about when deploying to a server using SFTP? Will I need to look into something like rsync?

Also, not sure if this is the place for feature requests, but I’d love if the removal of files could be handled when using the filesystem to deploy. We’re testing Buddy out by moving a couple of our sites from our current deploy tool, but this is one part of Buddy I wished was just a bit easier.

Appreciate your help here! :slightly_smiling_face:


#4

That’s right, Aaron. Just like you mention: make sure to use Rsync when it comes to the SFTP.

The option to make these files possible to remove is in our backlog. However, it’s not so easy to implement. The thing is that the changesets are based on the dates in the filesystem.

Preparing a mechanism that would calculate things differently is no small challenge. We keep it in mind but currently we’re working on other things :slight_smile:


#5

Totally understandable! Really appreciate the help and getting back as quickly as you have. I’ll be looking forward to the day where this can be handled within the “filesystem” directly, but until then this will give me some options.

Thanks again, @Octavia!


#6

Just saw this feature has just been added! https://buddy.works/blog/filesystem-deploy-deleted-files


#7

Yes, indeed! :slight_smile: