Green Deployment Despite Failed Web.config Update
Hi There,
After an apparently successful deployment through AppVeyor our Prod site did not start. We noticed that the web.config transformation did not happen and contained the wrong connection strings. After some digging we noticed that the AppVeyor's deployment console for the branch contained an error, saying that the web.config file was not accessible for update. See image.
There are 2 things that should be noted here:
1) The green mark saying that the deployment went well (this is misleadin)
2) Even though the site's web.config was not available for update per the error message the branche's web.config still overwrote it
Question: Is there a way to:
1) make sure that if any error occurs during deployment then the deployment is marked red or any other color than green?
2) how to prevent the original inaccessible/un-updatebale file still being overwritten
Thank you for your help!
Best regards,
Attila
- AppVeyorGreenError1.jpg 557 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 31 Jul, 2020 04:35 AM
Hi Attila,
If the last command in PowerShell script was successful (even a single
Write-Host
) then the entire script is considered to be successful - this is how PS works by default. Could it be your case? Is there another command after$webconfig.Save()
?2 Posted by akozma on 31 Jul, 2020 01:56 PM
Hi Feodor,
I think we are talking about two different things.
The previously posted image clearly shows that an Exception occurred. AppVeyor's engine does recognize this exception and displays it as red.
I believe, since this exception is now known to the AppVeyor's engine, it should be indicated to the user so the user, just by looking at the deployment list, be aware of it.
See this newly attached image which shows everything is green = the user thinks all deployments went well. This is misleading.
I am not arguing about how PS works or should work, I am saying/suggesting that this behavior of AppVeyor should be looked at from a usability standpoint and changed so that the user can find deployment errors much easier.
Thanks,
Attila
Support Staff 3 Posted by Feodor Fitsner on 31 Jul, 2020 05:24 PM
Try adding this to the top of your
deploy.ps1
script to see if that helps:4 Posted by akozma on 03 Aug, 2020 01:41 PM
Hi Feodor,
Thank you. We will try it.
Best,
Attila