Until now we’ve just been doing build/test (e.g. CI) but want to dip our toes in with deployment (CD).
We are mostly building .NET dotnet core web applications which we deploy via IIS.
Initially I just want to be able to deploy updates (i.e. IIS is already configured, folder structure already in place etc).
I’m intending to go down the route of;
- dotnet publish from the linux/docker runner to a local path
- ssh to windows server (will need to enable openssh server)
- zip up the current contents of the www folder
- delete the contents of the www folder (this can be problematic if it’s “in use”, so may need to use a command to stop the site in IIS first)
- scp the new files across
Does that sounds like a good plan? Writing it down, i’m now thinking creating a new folder with and SCPing the files across maybe should be the first step then if we can change IIS to point to the new folder the downtime might be minimized…
It would be great in future to run a suite of (non-destructive) tests against the production environment after deployment and even be able to rollback if any fail.
Have you come up with anything?