How to fail deployment if Octopus failed to find the Deploy Config transformation file

Hi,
Recently, we had a problem where developer’s merge deleted the deploy config for our test environment. This cause a chaos as transformation was not applied and we had a faulty release.

Is it possible to fail the deployment if octopus failed to find the explicit deploy config provided in additional transform field. Currently, it just pass the deployment with no transformation applied and keep the base config.

Regards
Saba

Hi Saba,

Thanks for getting in touch! Sounds like a very not fun situation you had. To clarify is the file listed explicitly in your additional transforms? IE no wildcard is used.
I had a little discussion and we think just adding this would break a whole number of existing installations as having it not error when its not found was the desired outcome for them - we are adding some verbose logging if we dont find a file, but it won’t help you at all.
We did think that if you did have a very explicitly defined file name and path, if this wasn’t found we could error, but not if you had any form of wildcard or variable in use.

If you could provide us with the example you have we can figure out if there is much we can do about it.

Vanessa

Hi Vanessa,

Many thanks for getting in touch. I have attached the configuration settings we are using. I am using variable OctopusBrandCode to set deploy configs based on environment for different systems.

I just want if Octopus failed to find a transformation file e.g Deploy-TestGroups then it should fail the build.

Hope I am using the correct configuration to do his task and explained it well.

Kind Regards
Saba

Hi Saba,

Sorry for the delay in getting back to you about this. We determined that if it was explicitly listed, then failing would be ideal, but at this point it would be too much of a breaking change to make it part of the feature as too many customers have explicitly listed commands for one environment that need to not work on another without failing.

It unfortunately is just too late for us to consider this behavior at this stage and we would prefer not to add another flag/variable at deployment level to turn it on or off.

You could run a pre-deploy PowerShell script to check for files and cause a failure as a workaround for files you know need to be in your package.

Sorry for the bad news.
Vanessa

Hi,

I have the same request. How can you ever know if the connectionstrings transformed correct or if any transform whent well? I cant see a situation where anybody would like to continue when a transform fails? They have obviously structured things wrong then.

We have alot of transforms in the Additional transforms area and the are motly looking like this.

Configuration#{Environment}\connectionStrings.#{Environment}.config => connectionStrings.config

The variable differs, Dev,Test,Prod.

I have no ide if the connectionString accually contains the values for production or something else entirely.

A checkbox for “Fail on transform warnings” seems like a really small thing to implement. And it wouldnt affect the “others”.

/ Stefan

Hi Stefan,

We do agree that the it would have been best if we had done it this way. We still stand by what was stated below that it is just too late for us to implement it now and break those that are currently deploying.
Our position on this hasn’t changed.

There are no such things as small changes, and we consider every flag we add to the UI, as adding more than necessary for features not everyone uses or requires makes the steps and features overly complex and cluttered. It also means API additions, tests etc.

We do not monitor this forum for feature ideas or requests. You are welcome to add it to our Uservoice to see what community support would be on this. https://octopusdeploy.uservoice.com/
Vanessa

Hi Vanessa,
Thank you for your reply!
I understand that it might cause problems for others. I solved the issue by adding some extra tags in the, for example, the appsettings. A Post-deploy powershell script then looks in the web.config and matchens the elements value to a environment variable. Exits with 1 if they doesnt match.

The sweetest thing would have been if thar feature would have looken like the Add variable section, with a row for each and a scope column .

But being able to run PS scripts solves most problems. That is a great feature, the pre, deploy and post-script.

/ Stefan

Skickat från min iPhone

Hi Stefan,

Sounds like you found a really great solution. Yeah those deploy scripts really do save the day a lot of the time!

Vanessa

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.