在 TeamCity 构建期间将 nuget 包发布到 Octopus [英] Publish nuget package during TeamCity build to Octopus

查看:42
本文介绍了在 TeamCity 构建期间将 nuget 包发布到 Octopus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个已知问题,如果您在 TeamCity 构建期间部署,则会部署以前的版本(因为当前版本仅在构建完成后可用).

There is a known problem that if you deploy during a TeamCity build, a previous version will be deployed (as the current will be available only after the build is finished).

文档建议创建一个辅助 TeamCity BuildConfiguration 作为解决方法,但它很糟糕并且似乎不再起作用(有许多关于它的错误报告).

Documentation suggests creating a secondary TeamCity BuildConfiguration as a workaround but it sucks and seems not to work anymore (there is a number of bug reports about it).

在对这个问题的评论中提出了替代解决方案.这个想法是将您当前的构建 nuget 包推送到 Octopus nuget 服务器(并基于它而不是 TeamCity nuget 提要进行部署).

There was an alternative solution suggested in the comments to this question. The idea is to push your current build nuget package to the Octopus nuget server (and deploy based on it instead of TeamCity nuget feed).

所以我创建了一个 NuGet Publish 构建步骤,指定了 Api 密钥和包源,但我不知道在包字段中指定什么.换句话说,为我的构建新创建的 nuget 包的路径是什么?

So I've created a NuGet Publish build step, specified Api Key and Package Source but I have no idea what to specify in Packages field. In other words, what is the path to a freshly created nuget package for my build?

推荐答案

OctoPack 在项目的子目录 \obj\octopacked\ 中创建 .nupkg 文件,该文件包含.nuspec 文件

OctoPack creates the .nupkg file in a subdirectory \obj\octopacked\ of the project that contains the .nuspec file

这篇关于在 TeamCity 构建期间将 nuget 包发布到 Octopus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆