【问题标题】:Adding the Octopus build number to a project level variable将 Octopus 内部版本号添加到项目级别变量
【发布时间】:2021-07-12 07:18:15
【问题描述】:

我的一个配置文件中有一个 {#ServiceVersion} 项目变量,我不能将它设置为存储在章鱼变量中的章鱼版本号。

我已经尝试过看起来像这样的基本 PowerShell 脚本:

$ServiceVersion = "$($OctopusParameters['Octopus.Release.Number'])"; 

但这似乎不起作用。

【问题讨论】:

  • 告诉我们运行代码时发生了什么。 “似乎不起作用” 不提供任何信息。错误信息?也请在您的问题中发布这些内容。

标签: powershell deployment octopus-deploy octopus


【解决方案1】:

要为 Octopus 系统变量设置别名,您需要将其作为变量添加到您的项目中。

然后您可以将变量与配置替换功能之一一起使用。

【讨论】:

    猜你喜欢
    • 2023-03-11
    • 1970-01-01
    • 2011-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多