PreDeploy Script Not Running after failed deploy

Hi, This might be by design, but thought I would ask.

We have fresh machines we are deploying to. We deploy a windows service as part of our deploy, we do this with a deploy script in our nuget package because we are using topshelf with .net core. We also have a preDeploy script in our nuget package which is there to stop and uninstall our service prior to deploying the new version.

When we first deploy, the preDeploy script does not run, which is ok. But, our first deploy failed while running a later step to integration test things because of config issues with the service, but the service was installed. When we deploy again, the predeploy script does not run, so our service does not get uninstalled, so the new service does not get deployed because it is already there.

Obviously we could put the code to uninstall our service in the deploy script to solve this. Just wondering if this is by design or subtle bug?

Thanks.

Hi Simon,

Thanks for getting in touch! To get a better idea of what could be going wrong here I will need to get a copy of the raw deployment log where this pre-deploy script is not executing. The documentation I have linked to has instructions of downloading the raw deployment log. Can you please attach the file to your reply?

Looking forward to hearing from you and getting to the bottom of this. :slight_smile:

Best regards,
Daniel

This was actually self inflicted, sorry for troubling you. It was a combination of bad configuration in our variables for production and having no output from our script in a particular situation.

Hi Simon,

Thanks for the update here! I’m glad to hear you have it working now. :slight_smile:

Please don’t hesitate to get in touch if you have any further questions.

Best regards,
Daniel

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