How can one set retries when deploying to environment?

Marius Mikelsen's Avatar

Marius Mikelsen

29 Oct, 2021 10:47 AM

I am having a lot of issues with some jobs in an environment failing quite often with the error:

Web Deploy cannot modify the file 'MyDll.dll' on the destination because it is locked by an external process.  In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt.

From this AppVeyor guide I don't see any settings available for setting retries here, like you do with sync_retry_attempts and sync_retry_interval on WebDeploy providers. I don't really want to change any AppOffline rules, since I want the old application to be up until the second the new application is ready. Is there any other way of specifying that I want AppVeyor to try the specific job that failed again?

  1. Support Staff 1 Posted by Feodor Fitsner on 03 Nov, 2021 03:00 PM

    Feodor Fitsner's Avatar

    Hi Marius,

    You can do a script calling AppVeyor API with retries to start a new deployment:

  2. 2 Posted by Marius Mikelsen on 12 Nov, 2021 09:39 AM

    Marius Mikelsen's Avatar

    Does this mean that there is nothing I can do in my appveyor.yml file to get it to retry whenever it fails a deployment? This is becoming a thorn in the side with 1/3 deployments failing on one or more servers, so we need to constantly watch the deployments (the project status is green even if the deployment fails on one of 20 servers for instance).

    It seems like there really should be an easier solution to this.

  3. Support Staff 3 Posted by Feodor Fitsner on 16 Nov, 2021 04:11 AM

    Feodor Fitsner's Avatar

    Customers implement scripts using AppVeyor REST API checking deployments status. Like, have environment deployments in deploy section and then a PS loop checking the status of N last deployments in after_deploy section.

  4. Feodor Fitsner closed this discussion on 16 Jan, 2022 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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

Recent Discussions

27 Jan, 2023 08:06 PM
27 Jan, 2023 08:05 PM
25 Jan, 2023 03:23 PM
25 Jan, 2023 03:22 PM
23 Jan, 2023 03:29 PM