我有一个TeamCity/OctopusDeploy集成,它以前工作得很好,但是突然失败而没有在配置中进行任何更改。
唯一改变的是同时更新了TeamCity和OctopusDeploy。有人知道是什么原因造成的吗?我该怎么解决呢?
下面是最后一个成功构建的日志:
Step 5/5: OctopusDeploy: Create release (22s)
[Step 5/5] Octopus Deploy (21s)
[Octopus Deploy] Running command: octo.exe create-release --server http://localhost:8888/octopus --apikey SECRET --project Test Configuration Dev --enableservicemessages --version 0.0.0-develop.10 --deployto Test Environment --progress --package DemoFetcher:0.0.0-develop.10
[Octopus Deploy] Creating Octopus Deploy release
[Octopus Deploy] Octopus Deploy Command Line Tool, version 5.2.6
[Octopus Deploy]
[Octopus Deploy] Detected automation environment: "TeamCity/2018.2.4"
[Octopus Deploy] Space name unspecified, process will run in the default space context
[Octopus Deploy] Handshaking with Octopus Server: http://localhost:8888/octopus
[Octopus Deploy] Handshake successful. Octopus version: 2019.3.1; API version: 3.0.0
[Octopus Deploy] Authenticated as: Admin <admin@company.com>
[Octopus Deploy] This Octopus Server supports channels
[Octopus Deploy] Finding project: Test Configuration Dev
[Octopus Deploy] Automatically selecting the best channel for this release...
[Octopus Deploy] Building a release plan for Channel 'Default'...
[Octopus Deploy] Finding deployment process...
[Octopus Deploy] Finding release template...
[Octopus Deploy] The package version for some steps was not specified. Going to try and resolve those automatically...
[Octopus Deploy] Finding latest package for step: Install Company Test App Config Service
[Octopus Deploy] Selected 'TestApp.test' version '0.0.0-develop.10' for 'Install Company Test App Config Service'
[Octopus Deploy] Selected the release plan for Channel 'Default' - it is a perfect match
[Octopus Deploy] Using version number provided on command-line: 0.0.0-develop.10
[Octopus Deploy] Release plan for Test Configuration Dev 0.0.0-develop.10
[Octopus Deploy] Channel: 'Default' (this is the default channel)
[Octopus Deploy] # Name Version Source Version rules
[Octopus Deploy] --- ------------------------------------------------------- ------------------ ------------------ -------------------
[Octopus Deploy] 1 Install Company Test App Config Service 0.0.0-develop.10 Latest available Allow any version
[Octopus Deploy]
[Octopus Deploy] Creating release...
[Octopus Deploy] Release 0.0.0-develop.10 created successfully!
[Octopus Deploy] ##teamcity[setParameter name='octo.releaseNumber' value='0.0.0-develop.10']
[Octopus Deploy] Deploying Test Configuration Dev "0.0.0-develop.10" to: Test Environment (Guided Failure: Not Enabled)
[Octopus Deploy] Waiting for 1 deployment(s) to complete....
[Octopus Deploy] Success: Acquire packages
[Octopus Deploy] Success: Step 2: Install Company Test App Config Service
[Octopus Deploy] Success: Apply retention policy on Tentacles
[Octopus Deploy] Deploy Test Configuration Dev release 0.0.0-develop.10 to Test Environment: Success
[Octopus Deploy] Done!
[Octopus Deploy] Octo.exe exit code: 0
相比之下,下面是第一个失败构建的日志:
Step 6/6: OctopusDeploy: Create release (2s)
[Step 6/6] Octopus Deploy (1s)
[Octopus Deploy] Running command: octo.exe create-release --server http://localhost:8888/octopus --apikey SECRET --project Test Configuration Dev --enableservicemessages --version 0.0.0-develop.17 --deployto Test Environment --progress --package DemoFetcher:0.0.0-develop.17
[Octopus Deploy] Creating Octopus Deploy release
[Octopus Deploy] Octopus Deploy Command Line Tool, version 5.2.6
[Octopus Deploy]
[Octopus Deploy] Detected automation environment: "TeamCity/2019.1"
[Octopus Deploy] Space name unspecified, process will run in the default space context
[Octopus Deploy] Handshaking with Octopus Server: http://localhost:8888/octopus
[Octopus Deploy] Handshake successful. Octopus version: 2019.3.3; API version: 3.0.0
[Octopus Deploy] Authenticated as: Admin <admin@company.com>
[Octopus Deploy] This Octopus Server supports channels
[Octopus Deploy] Finding project: Test Configuration Dev
[Octopus Deploy] Automatically selecting the best channel for this release...
[Octopus Deploy] Building a release plan for Channel 'Default'...
[Octopus Deploy] Finding deployment process...
[Octopus Deploy] Finding release template...
[Octopus Deploy] The package version for some steps was not specified. Going to try and resolve those automatically...
[Octopus Deploy] Finding latest package for step: Install Company Test App Config Service
[Octopus Deploy] Octopus Server returned an error: The V2 feed at 'http://collaboration.company.de/httpAuth/app/nuget/feed/_Root/default/v2/FindPackagesById()?id='TestApp.test'&semVerLevel=2.0.0' returned an unexpected status code '403 '.
[Octopus Deploy] Server exception:
[Octopus Deploy] The V2 feed at 'http://collaboration.company.de/httpAuth/app/nuget/feed/_Root/default/v2/FindPackagesById()?id='TestApp.test'&semVerLevel=2.0.0' returned an unexpected status code '403 '.
[Octopus Deploy] NuGet.Protocol.Core.Types.FatalProtocolException
[Octopus Deploy] at NuGet.Protocol.V2FeedParser.<>c__DisplayClass53_0.<LoadXmlAsync
[Octopus Deploy] at NuGet.Protocol.HttpSource.ProcessResponseAsync
[Octopus Deploy] at NuGet.Protocol.V2FeedParser.LoadXmlAsync
[Octopus Deploy] at NuGet.Protocol.V2FeedParser.QueryV2Feed
[Octopus Deploy] at NuGet.Protocol.V2FeedParser.FindPackagesByIdAsync
[Octopus Deploy] at NuGet.Protocol.PackageMetadataResourceV2Feed.GetMetadataAsync
[Octopus Deploy] at Octopus.Shared.Util.TaskExtensions.PrepareForRethrow(Exception exception)
[Octopus Deploy] at Octopus.Shared.Util.TaskExtensions.SafeResult[T](Task`1 task, CancellationToken cancellationToken)
[Octopus Deploy] at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.FetchPackageMetadataForAllVersionsExpensive(String packageId, Boolean allowPreRelease, CancellationToken cancellationToken)
[Octopus Deploy] at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.ListVersions(String packageId, CancellationToken cancellationToken, PackageVersionSearchOptions searchOptions, Int32& total, Int32 skip, Int32 take, Boolean includeReleaseNotes)
[Octopus Deploy] at Octopus.Server.Web.Api.Actions.PackageSearchActionOld.Search(String feedId, String packageId, Boolean partialMatch, Boolean includeMultipleVersions, Boolean includeNotes, Int32 take, PackageVersionSearchOptions searchOptions, Boolean descriptionsOptional)
[Octopus Deploy] at Octopus.Server.Web.Api.Actions.PackageSearchActionOld.ExecuteRegistered()
[Octopus Deploy] at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)
[Octopus Deploy] at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
[Octopus Deploy] at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
[Octopus Deploy] at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
[Octopus Deploy] -----------------------
[Octopus Deploy]
[Octopus Deploy] Error from Octopus Server (HTTP 500 InternalServerError)
[Octopus Deploy] Exit code: -7
[Octopus Deploy] Octo.exe exit code: -7
[Step 6/6] Unable to create or deploy release. Please check the build log for details on the error.
[Step 6/6] Unable to create or deploy release. Please check the build log for details on the error.
[Step 6/6] Step OctopusDeploy: Create release failed
更新14-6月-2019年:
在“八达通部署”中尝试手动创建发行版时,将显示下列匹配错误消息:
The V2 feed at 'http://collaboration.company.de/httpAuth/app/nuget/feed/_Root/default/v2/FindPackagesById()?id='TestApp.test'&semVerLevel=2.0.0' returned an unexpected status code '403 '.
这听起来像是身份验证问题。我想我是在OctopusDeploy的->外部提要、-> TeamCity包、->凭据上找到的。但是,我不知道在TeamCity中配置凭据的匹配端隐藏在哪里。它似乎不在部署步骤中。有人知道在哪里配置这个吗?
发布于 2019-06-12 07:16:26
您的包裹更改如下:
--package DemoFetcher:0.0.0-develop.10
至:
--package DemoFetcher:0.0.0-develop.17
第二份工作找不到这个包:
http://collaboration.company.de/httpAuth/app/nuget/feed/_Root/default/v2/FindPackagesById()?id='TestApp.test'&semVerLevel=2.0.0' returned an unexpected status code '403 '
还原您的包或验证NuGet服务器上存在的所有包。
发布于 2019-06-14 01:20:55
好吧,我现在明白了,这是一个两层的问题,一旦我找出了问题所在,就很容易解决了。
表面上的问题是,OctopusDeploy用来访问TeamCity包提要的"octopus“登录在TeamCity中不再起作用。
然而,实际的问题是,OctopusDeploy中的构建配置首先尝试使用TeamCity包提要,即使在前面的构建步骤中包被推到内部OctopusDeploy提要。
现在,我通过将“”项目的受影响部署步骤的Package feed
中的Package Details
从"TeamCity包“更改为"Octopus (内置)”来修复这个问题。
现在起作用了。
因此总结一下:如果您有此问题,请尝试使用内部octopus提要作为包源,因为它更易于配置。
发布于 2019-06-26 05:26:11
我找到了发生这种事的原因
由于某些原因,章鱼被配置为在TeamCity提要中查找包,而TeamCity则将包推送到八达通提要。我通过告诉Octopus从集成的Octopus (而不是TeamCity提要)获取包来修正这个问题,现在它开始工作了。
现在让我感到困惑的是,这之前是如何工作的,特别是因为我无法在“八达通”或“TeamCity审核”中检测到任何配置更改。但是哦,好吧,只要它现在起作用,那就好了。
https://stackoverflow.com/questions/56564559
复制相似问题