ServiceFabricPowerShell@1 - Service Fabric PowerShell v1 任务

使用此任务可在 Azure Service Fabric 群集连接的上下文中运行 PowerShell 脚本。 在初始化 Service Fabric 群集连接的 PowerShell 会话中运行任何 PowerShell 命令或脚本。

语法

# Service Fabric PowerShell v1
# Run a PowerShell script in the context of an Azure Service Fabric cluster connection.
- task: ServiceFabricPowerShell@1
  inputs:
    clusterConnection: # string. Alias: serviceConnectionName. Required. Cluster Service Connection. 
    ScriptType: 'FilePath' # 'FilePath' | 'InlineScript'. Required. Script Type. Default: FilePath.
    #ScriptPath: # string. Optional. Use when ScriptType = FilePath. Script Path. 
    #Inline: # string. Optional. Use when ScriptType = InlineScript. Inline Script. 
    #ScriptArguments: # string. Script Arguments.

输入

clusterConnection - 群集服务连接
输入别名:serviceConnectionNamestring。 必填。

指定在执行指定的 PowerShell 脚本时将具有已建立的服务连接的 Azure Service Fabric 群集。


ScriptType - 脚本类型
string。 必填。 允许的值:FilePath(脚本文件路径)、InlineScript(内联脚本)。 默认值:FilePath

指定脚本是作为文件提供,还是在任务中内联提供。


ScriptPath - 脚本路径
string。 可选。 当 ScriptType = FilePath时使用。

指定要运行的 PowerShell 脚本的路径。 可以包含通配符和变量。 示例:$(system.defaultworkingdirectory)/**/drop/projectartifacts/**/docker-compose.yml

注释

作为此任务的一部分,不支持组合撰写文件。


Inline - 内联脚本
string。 可选。 当 ScriptType = InlineScript时使用。 默认值:# You can write your PowerShell scripts inline here. \n# You can also pass predefined and custom variables to this script using arguments

指定要在生成代理上运行的 PowerShell 命令。 详细了解 PowerShell 任务


ScriptArguments - 脚本参数
string

指定要传递给 PowerShell 的其他参数。 可以是序号参数或命名参数。


任务控制选项

除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性

输出变量

没有。

注解

使用此任务可在 Azure Service Fabric 群集连接的上下文中运行 PowerShell 脚本。 在初始化 Service Fabric 群集连接的 PowerShell 会话中运行任何 PowerShell 命令或脚本。

Service Fabric

要求

要求 说明
管道类型 YAML,经典版本,经典版本
运行时间 代理,DeploymentGroup
需求 自承载代理必须具有与以下 要求 运行使用此任务的作业 功能: Cmd
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任何
Settable 变量 任何
代理版本 1.95.0 或更高版本
任务类别 效用