Teamcity Octopus-deploy 集成 - 强制重新部署预先存在的版本(使用 --force 选项)

标签 teamcity octopus-deploy

我们正在 teamcity 中使用 octopus-deploy 构建步骤来从另一个构建配置部署最新的成功构建。

我的目的是将版本号与工件编号相关联(工件编号又与 SCM 编号相关联)。

当我部署新版本时,octopus 会使用该版本创建一个新版本,然后部署它。

如果我再次运行 teamcity 部署步骤(对于已创建的工件),octopus 应使用相同的版本号重新部署相同的工件。 (而不是因“此版本已存在”而失败)。

从 octo.exe 文档中,--force 选项应该允许我执行此操作。 (我应该能够将其添加到 teamcity 中的“其他命令行参数”中)。

但是我收到无法识别的命令参数:--force错误。

我该如何解决这个问题?或者还有什么其他选择? (不改变工件/版本编号策略)。

通话:

octo.exe create-release --server octoServerHostName --apikey SECRET --project 项目名称 --enableservicemessages --version 1.0.59356.0 --deployto show --waitfordeployment --force

创建 Octopus Deploy 版本 [15:26:05]Octopus 部署命令行工具,版本 2.0.8.22 [15:26:05] [15:26:05]无法识别的命令参数:--force

最佳答案

在 octopus 部署 2.0+ 中,您可以使用:

--ignoreexisting   If a release with the version number already 
                   exists, ignore it

--force [Optional] If a project is configured to skip
                   packages with already-installed versions,
                   override this setting to force re-deployment
                   (flag, default false).

要在单个 teamcity 步骤中实现您想要的效果,您需要 --ignoreexisting --force

关于Teamcity Octopus-deploy 集成 - 强制重新部署预先存在的版本(使用 --force 选项),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23620314/

相关文章:

asp.net - 文件转换,是否可以将自动增量添加到设置中

android - 如何使用TeamCity构建我的React native 应用程序?

powershell - Chocolatey 找不到 Windows 功能

sql - Octopus Deploy - 执行脚本文件

.net - 我可以创建一个没有项目文件的 nuget 包吗

azure - 部署到 Azure 应用服务时迁移数据库

iis - 部署之间不会保留手动生成的 MachineKey

git - 基于 checkin 到 teamcity 中 GIT 存储库中的特定文件夹构建触发器

Teamcity - bitbucket 的间歇性传输异常

团队城市。命令行构建步骤。 setParameter总是显示 "Incorrect property name"错误