Jenkins 使用 OctoPack 和 ReadyRoll 生成警告 "source file does not exist"

Jenkins build warnings "source file does not exist" with OctoPack and ReadyRoll

我正在尝试使用 ReadyRoll 设置 Jenkins 构建项目。大多数情况下它都在工作,但我收到了与我有关的警告:

  MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\bin\Release\' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
  MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\Release\CoreServices_Package.sql' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]

我搜索了有关此错误的信息,但没有找到有用的信息。当我在构建完成后检查构建服务器时,它说不存在的文件夹和文件确实存在。这对我来说意味着这里发生了某种操作顺序错误,但我不知道会在哪里或如何发生。

这是生成警告的日志部分:

OctoPack:
  Using package version: 8.6.26
  OctoPack: OctoPack version: 3.6.1.0
  OctoPack: Written files: 10
  OctoPack: Copy file: c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\Release\CoreServices.nuspec
  OctoPack: Packaging a console or Window Service application (no Web.config detected)
  OctoPack: Add binary files
  OctoPack: Added file: CoreServices_Package.sql
  OctoPack: Added file: CoreServices_DeployPackage.ps1
  OctoPack: Added file: CoreServices_Snapshot.nupkg.bin
MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\bin\Release\' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
  OctoPack: Added file: Deploy.ps1
  OctoPack: Added file: DeployFailed.ps1
MSBUILD : OctoPack warning OCTNOENT: The source file 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\Release\CoreServices_Package.sql' does not exist, so it will not be included in the package [c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\CoreServices.sqlproj]
  OctoPack: Added file: CoreServices.dll
  OctoPack: Added file: CoreServices.pdb
  OctoPack: NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
  OctoPack: Attempting to build package from 'CoreServices.nuspec'.
  OctoPack: Successfully created package 'c:\scm01-jenkins\workspace\DatabaseDeploys\DatabaseDeploys\CoreServices\obj\octopacked\IC_CoreServices.Database.8.6.26.nupkg'.

这里是 MSBuild 参数:

/t:Clean,Build /p:Version=8.6.26.0;Configuration=Release /p:GenerateSqlPackage=True /p:ShadowServer=[shadowdatabasename] /p:RunOctoPack=true /p:OctoPackPackageVersion=8.6。 26 /p:OctoPackPublishPackageToHttp=http://[OctopusDeployServer]/nuget/packages /p:OctoPackPublishApiKey=[密钥]

有什么解决办法吗?

谢谢。

不幸的是,这是 ReadyRoll 与 OctoPack 集成的一个已知问题,但是这些警告是无关紧要的,可以安全地忽略。

要取消警告,请将以下内容添加到您的 MSBuild 参数中:

/nowarn:OCTNOENT

问题解决后我会更新此答案 (1003)。

作为 ReadyRoll 1.16.18100 的一部分发布了针对此问题的修复;在构建过程中不应再显示 OctoPack 警告。