Exclude files from deploy package

I have a package that looks kinda like this:

I have a number of files, but the index.html needs to be deployed last. I can only think of excluding the index.html from the deploy step, and then in the next step deploy the index.html. I cant do this though because there is no way to exclude the one file. I can only see how to include specific files:

Does this field support full regex? Can I use multiple lines like this? This is the octopus deploy step: Octopus.AwsUploadS3. Of all the solutions I don’t want to individually enumerate all files.

Hi @samuelt12,

Thank you for contacting Octopus Support.

Is it possible to break this into separate packages, excluding the index.html from the primary package? Also, could you give provide additional context as to the reason you need to extract in a particular order? You may be able to do this across two “Upload a package to an AWS S3 bucket” steps, but want to confirm your use case before making a more specific recommendation.

Let me know at your earliest convenience.


The reason is because of the way the Cloudfront handles not found errors. The index.html points to the rest of my files. So if the index.html file gets replaced first then all the files it is pointing to don’t exist yet, they will in like 4 seconds, but there will be some time that index.html is pointing to the wrong spot. I can split the package up into two packages, but that sounds aweful to manage. I dont want a package with just one file index.html

Hi @samuelt12,

Thank you for the quick response.

Are you looking to achieve a zero-downtime scenario? If this is the case, would caching be an option to account for deployments?

For reference, he is some interesting reads on this topic:

Let me know your thoughts.


I am doing this already, more or less. My only caveat is that it only works if index.html is the last thing to upload, and not the first thing to upload. I am trying to keep things as simple as possible, and doing most of the suggestions in the two stack exchanges require another step in AWS that no one will understand. I am the only one in the company that understands any of this so I dont want to get too complicated. I am trying to make it so managers can understand what is happening. We are a small shop.

I am caching already, but that cant clear the issue because someone in the philippines could hit the cache, but someone in texas might miss the cache because it is expired there. It is better than nothing, and I will probably use that if I cant get index.html to load last.

I might use this guys answer.

I could upload to a temp folder, then copy the contents of temp to the real folder using s3 commands. That seems not too bad.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.