Service Fabric PowerShell task
Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019
Use this task to run a PowerShell script within the context of an Azure Service Fabric cluster connection. Runs any PowerShell command or script in a PowerShell session that has a Service Fabric cluster connection initialized.
Prerequisites
Service Fabric
This task uses a Service Fabric installation to connect and deploy to a Service Fabric cluster.
Azure Service Fabric Core SDK on the build agent.
YAML snippet
# Service Fabric PowerShell
# Run a PowerShell script in the context of an Azure Service Fabric cluster connection
- task: ServiceFabricPowerShell@1
inputs:
clusterConnection:
#scriptType: 'FilePath' # Options: filePath, inlineScript
#scriptPath: # Optional
#inline: '# You can write your PowerShell scripts inline here. # You can also pass predefined and custom variables to this script using arguments' # Optional
#scriptArguments: # Optional
Arguments
| Argument | Description |
|---|---|
| Cluster Connection | The Azure Service Fabric service connection to use to connect and authenticate to the cluster. |
| Script Type | Specify whether the script is provided as a file or inline in the task. |
| Script Path | Path to the PowerShell script to run. Can include wildcards and variables. Example: $(system.defaultworkingdirectory)/**/drop/projectartifacts/**/docker-compose.yml. Note: combining compose files is not supported as part of this task. |
| Script Arguments | Additional parameters to pass to the PowerShell script. Can be either ordinal or named parameters. |
| Inline Script | The PowerShell commands to run on the build agent. More information |
| Control options | See Control options |
Also see: Service Fabric Compose Deploy task
Open source
This task is open source on GitHub. Feedback and contributions are welcome.
FAQ
Do I need an agent?
You need at least one agent to run your build or release.
I'm having problems. How can I troubleshoot them?
See Troubleshoot Build and Release.
I can't select a default agent pool and I can't queue my build or release. How do I fix this?
See Agent pools.
My NuGet push task is failing with the following error: "Error: unable to get local issuer certificate". How can I fix this?
This can be fixed by adding a trusted root certificate. You can either add the NODE_EXTRA_CA_CERTS=file environment variable to your build agent, or you can add the NODE.EXTRA.CA.CERTS=file task variable in your pipeline. See Node.js documentation for more details about this variable. See Set variables in a pipeline for instructions on setting a variable in your pipeline.
Feedback
Issottometti u ara feedback għal