One solution with multiple Web Apps, deploying to two different websites.

Barry's Avatar

Barry

Oct 13, 2017 @ 12:48 PM

Hi,

I have one solution that contains two web applications. I want to build and deploy both these web applications and deploy them to two different sites.

My yaml file is:

version: 1.0.{build}
image: Visual Studio 2017

environment:
  AutoParameterizationWebConfigConnectionStrings: false
  APPVEYOR_WAP_ARTIFACT_NAME: CustomName
  APPVEYOR_WAP_SKIP_ACLS: true


before_build:
- cmd: nuget restore "MySolution.sln"

build:
  project: MySolution.sln
  publish_wap: true
  verbosity: minimal


for:
-
 branches:
  only:
    - develop
 configuration: Debug

 deploy:
 - provider: Environment
   name: MyServer

In my environment I have Provider Settings of :

CustomName.deploy_website : true

CustomName.site_name : websiteA

I have two artifacts from my build step:

FileName: WebSiteA

FileName: WebSiteB

both have a deployment name of CustomName

I can't figure out how to configure this so that the artifacts are deployed correctly. Both the websites are on the same environment.

Thanks!

  1. 1 Posted by Ilya Finkelshte... on Oct 13, 2017 @ 05:51 PM

    Ilya Finkelshteyn's Avatar

    I would recommend to remove APPVEYOR_WAP_ARTIFACT_NAME: CustomName, thus deployment name for each website will be by default the same as website project, e.g. WebSiteA and WebSiteB. Then for each environment, use respective deployment name in settings, e.g. WebSiteA.deploy_website : true, WebSiteA.site_name : websiteA for one environment and WebSiteB.deploy_website : true, WebSiteB.site_name : websiteB for another.

  2. 2 Posted by Barry on Oct 16, 2017 @ 07:38 AM

    Barry's Avatar

    Thanks Ilya, that makes sense. I don't know why I didn't think of that! Thanks again

  3. 3 Posted by Ilya Finkelshte... on Oct 16, 2017 @ 07:58 AM

    Ilya Finkelshteyn's Avatar

    You are welcome! It can be tricky, please always feel free to ask :)

  4. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:20 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