1

I'm using Jenkins to build my AngularJS website and deploy it on a S3 bucket, and I'm also using filerev task through Grunt. I use this plugin to deploy from Jenkins to the bucket, but when a static resource is renamed via filerev when building the website, it's not removed from the bucket.

I don't want to use Object Expiration attribute of S3, I just want to remove out-of-date resources after deployment. Thanks!

pasine
  • 11,311
  • 10
  • 49
  • 81
sweepy_
  • 1,333
  • 1
  • 9
  • 28

1 Answers1

0

I don't have the possibility to test this, but I would suggest you to try to delete the files from your S3 bucket by adding an Execute shell step and use the AWS command line.
You can find how to do it in this answer or in the official Amazon Documentation. After deleting everything, you can deploy the new version of your app with the Jenkins plugin.

pasine
  • 11,311
  • 10
  • 49
  • 81