Appveyor,GitHub,回购中的多个项目

时间:2018-09-04 01:47:11

标签: github build appveyor

enter image description here

我正在尝试仅建立一个文件夹(请参见上文)。我在该文件夹中有以下YML文件:

version: '0.0.{build}'
image: Visual Studio 2017
configuration: Release
build: off

notifications:
- provider: Email
  to:
  - keith@sol3.net
  subject: CI build 0.0.{build} failed!
  on_build_success: false
  on_build_failure: true
  on_build_status_changed: false


init:
  # Best practice (Windows line endings different to Unix/Linux)
  - cmd: git config --global core.autocrlf true

install:
  appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/v4.0.0/nuget.exe

before_build:
  # Display .NET Core version
  - cmd: dotnet --version
  # Change to specific project folder
  - cmd: cd Sol3.Infrastructure
  # Display minimal restore text
  - cmd: dotnet restore Sol3.Infrastructure.csproj --verbosity m

build_script:
  - cmd: dotnet build Sol3.Infrastructure.csproj
  - cmd: dotnet pack -c Release /p:PackageVersion=0.0.{build} 

after_build:
  # For once the build has completed

on_finish :
  # any cleanup in here
deploy: off

不断出现太多SLN / PRJ文件错误。还请注意,由于版本与Appveyor本身的默认设置匹配,因此它没有使用此文件。  Appveyor的appveyor.yml文件:

version: 1.0.{build}
build:
  verbosity: minimal

供应商可以这样做吗?传送带是最佳选择吗?有指导吗?

这是我的沙箱(现在很小),我有几个项目,希望每个项目都有自己的appveyor.yml文件。我的确也有SLN文件,而这是我切换到VSCode之前来自VS2017的工件。认为我现在应该删除那些,直到需要将SLN放在一起为止。

1 个答案:

答案 0 :(得分:0)

默认情况下,AppVeyor在回购根目录中检查appveyor.yml.appveyor.yml。如果您需要指定自定义文件名或自定义路径(相对于回购根目录),则需要在常规项目设置的Custom configuration .yml file name中进行设置。 here是更多信息。现在可能发生的情况是,AppVeyor对Sol3.Infrastructure中的YML文件一无所知,并采用默认配置,在该默认配置中,它会搜索VS解决方案或要构建的项目。

旁注:

  • nuget是pre-installed
  • 我建议使用相对于build文件夹的路径,而不是 CD
  • 无需在on_finish进行清理,每个构建都在瞬态VM上运行, 在构建完成后立即将其删除