Separating building from deployment

mzabani's Avatar

mzabani

28 Aug, 2014 12:07 PM

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.

  1. Support Staff 1 Posted by Feodor Fitsner on 28 Aug, 2014 10:36 PM

    Feodor Fitsner's Avatar

    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. 2 Posted by mzabani on 29 Aug, 2014 01:46 PM

    mzabani's Avatar

    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?

  3. Support Staff 3 Posted by Feodor Fitsner on 29 Aug, 2014 09:26 PM

    Feodor Fitsner's Avatar

    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. 4 Posted by mzabani on 01 Sep, 2014 03:06 PM

    mzabani's Avatar

    Ok, we will try that option out. Thank you for all the help.

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:47 AM.

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

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM