How do I stage deployments?

ryan's Avatar

ryan

06 Apr, 2014 12:44 AM

I would like to configure deployment targets and then manually trigger deployments using Web Deploy. Specifically, while I like that a CI build can be continuously deployed, my typical target is not the production instance but merely a development instance where I could run additional tests before moving to another environment. I would like to avoid rebuilding the package when moving to other environments, such as QA and Production. Is it possible to push packages either manually or through a script?

Taking this further, I would really like to automate running longer-running automated tests after a deployment and, pending a successful test run, push to the next environment. I think I could do this using the Webhook from the initial build. Is that and advisable strategy?

Thanks,
Ryan

  1. Support Staff 1 Posted by Feodor Fitsner on 06 Apr, 2014 03:34 AM

    Feodor Fitsner's Avatar

    Hi Ryan,

    Yes, it's possible with AppVeyor and this is something we've been evangelizing from early beginning - do not re-build app for deploying to different environments. The results of your builds should be artifacts which are Web Deploy packages (or zip archives) if you are going to use Web Deploy. To create Web Deploy package you can either enable "Package Web Applications for Web Deploy" option on Build tab of project settings or use custom MSBuild command to publish a package (http://www.appveyor.com/docs/deployment/web-deploy).

    Then you create a new "Environment" (https://ci.appveyor.com/environments) of Web Deploy type, select project on Deployments tab and finally select build to deploy artifact (Web Deploy package) from. You can have as many Web Deploy environments as you need.

    Right now there are webhooks on build completion only, but if you are interested we can add webhooks for environments (deployment targets) too. Theoretically, to run your tests against deployed app you could use another AppVeyor project that you call using API.

    Please let me know if you have any questions.

  2. 2 Posted by ryan on 06 Apr, 2014 04:36 PM

    ryan's Avatar

    I completely missed the Deploy link on the Environments until this message. Only displaying the link on hover is nice but hides that immensely useful feature. Nevertheless, that was exactly what i was looking for in terms of triggering manual deployments.

    As to automating progression from one environment to the next, I'm open to using separate projects. You mentioned triggering the test through an API. Are you referring to manually triggering the test through an API call, or were you meaning I could do this through the use of Webhooks?

    Thanks for your help!
    Ryan

  3. Support Staff 3 Posted by Feodor Fitsner on 06 Apr, 2014 05:00 PM

    Feodor Fitsner's Avatar

    I agree we should made Deploy button more noticeable.

    Yep, I meant webhooks on deployment complete event + calling AppVeyor API to start a new build. However, on the second thought I don't think plain HTTP request webhook would work as you need some service (externally available) in the middle that will accept webhook request and then call API to start a new build. I think some sort of "Start AppVeyor build" webhook could work here.

    Next week I'm going to re-work build notifications mechanism to support Slack, HipChat and others, so maybe then I can apply that implementation to Environments as well.

    Btw, another approach would be to do all the job in a single build, i.e. build artifact, deploy to a selected environment, then wait until deployed app becomes available and finally run BVTs.

  4. ryan closed this discussion on 22 Sep, 2017 04:02 PM.

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