Is it possible to have multiple appveyor.yml configurations?

Ewout's Avatar


09 Mar, 2017 12:58 PM

In our project repository we have an appveyor.yml which is setup for our .NET web applications (with things like assembly patching, nuget restore, etc.). If everything succeeds, our application is deployed to a staging and production environment. The .NET solution is located in repo/src/.

In the same repository we also create our HTML templates located in repo/frontend/. We would like to do a deploy of these HTML-files to a FTP host. This Frontend configuration should be run before the other configurations, but logically fails on assembly_info and nuget restore when no .NET solution is created.

Is it possible to create an appveyor configuration which can deploy our Frontend configuration to FTP and optionally continue with the Debug and Release configurations when a .NET solution is available?

Our configuration file this far:

version: 1.0.0.{build}

  - develop
  - /release\/\d+.\d+.\d+/
  - master

image: Visual Studio 2015

  fast_finish: true     # set this flag to immediately finish build once one of the jobs fails.
    - platform: x86
      configuration: Debug
    - platform: x86
      configuration: Release

  patch: true
  file: AssemblyInfo.*
  assembly_version: "{version}"
  assembly_file_version: "{version}"
  assembly_informational_version: "{version}"

  account_feed: true

  - Frontend
  - Debug
  - Release

  publish_wap: true
  verbosity: minimal

  - cmd: nuget restore src\ProjectName.Web.sln

test: off

  - path: frontend/dist/
    name: frontenddist

  - provider: FTP
    protocol: ftp
    username: username
      secure: password
    folder: frontend-test
    application: frontenddist
    beta: true
      branch: develop
      configuration: frontend
  - provider: Environment
    name: ProjectName.Development
    remove_files: true
      branch: develop
      configuration: debug
  - provider: Environment
    name: ProjectName.Production
    remove_files: false
      branch: master
      configuration: release

  - provider: Slack
    incoming_webhook: slack-hook
    on_build_success: true
    on_build_failure: true
    on_build_status_changed: false
  1. Support Staff 1 Posted by Ilya Finkelshte... on 09 Mar, 2017 07:20 PM

    Ilya Finkelshteyn's Avatar

    Hi Ewout,

    I would do the following:

    • Create separate AppVeyor projects for FrontEnd and BackEnd. You can target the same repository from different projects and use separate YAML files with custom name as described here
    • Make FrontEnd build call BackEnd build as on_success script from PowerShell using API. Here is PowerShell sample
    • You can run this start build script conditionally if BackEnd .NET solution is available. You can simple check it with test-path (if I understand what does 'available' means correctly).

    There are still few open questions common for this kind of chaining:

    • What kind of change should trigger FrontEnd build?
    • Should BackEnd build be triggered by some change or only by FrontEnd build?
    • Should FrontEnd build wait for BackEnd build to finish successfully and fail if BackEnd build is not happy?


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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