Separating building from deployment
Hi guys,
I'm in a situation where I'd like to maintain a build+test history of every commit pushed on master, but I'd only like to deploy to Azure based on a certain crontab expression. Is there anyway to separate the deployment step from the build+test step and schedule only the deployment?
Thanks in advance,
Marcelo.
Comments are currently closed for this discussion. You can start a new one.
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 28 Aug, 2014 10:36 PM
That's an interesting scenario. You can specify a certain environment variable as deployment condition. I would imagine we could set some system variable when it is a scheduled build, something like
APPVEYOR_SCHEDULED_BUILD=true
. Would that work?2 Posted by mzabani on 29 Aug, 2014 01:46 PM
That sounds good! However, we are checking "Package Web Applications for Web Deploy", which seems to add a DeployOnBuild property to the msbuild invocation. Would the deploy conditions still be checked in that case (and if so, the build couldn't be marked as failed)?
Also, just out of curiosity, why is this an interesting scenario? As far as I know, deploying an ASP.NET website is not atomic, so taking the app offline is the way we prefer doing things, and therefore we schedule our deployments to hours of minimal usage. Is this uncommon?
Support Staff 3 Posted by Feodor Fitsner on 29 Aug, 2014 09:26 PM
OK, I see. Then I'd recommend setting up a separate project just for deployment purposes and using AppVeyor REST API in a custom script for kicking of a new deployment. Take a look at this method: http://www.appveyor.com/docs/api/environments-deployments#start-dep...
The sample how to use API from PowerShell and C#: http://www.appveyor.com/docs/api
Let me know if you have any questions.
4 Posted by mzabani on 01 Sep, 2014 03:06 PM
Ok, we will try that option out. Thank you for all the help.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:47 AM.