Open badjouras opened 2 years ago
That won't help. Azure Pipelines can't execute a PowerShell task on PowerShell Core and will always use Windows PowerShell available on the host. For these tasks to work on a non-windows agent, thy need to be rewritten in Node using the Azure Pipelines Task Lib.
Are you referring to a pipeline task defined in a piepline YAML, or to a marketplace task?
I am using pipeline PowerShell tasks on a ubuntu agent with no problem:
The databricksDeployDBFSFiles.ps1
is simply a modified, simpler version of https://github.com/DataThirstLtd/databricks.vsts.tools/blob/master/deployDBFSFilesTask/vstsDeployDBFSFile.ps1
The JSON for each task restricts it to Windows agents: https://github.com/DataThirstLtd/databricks.vsts.tools/blob/master/deployScriptsTask/task.prod.json
Running them on a Ubuntu agent yields an error message:
##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
However, the powershell modules from azure.databricks.cicd.tools support Powershell Core and, hence, work on Linux agents.
The JSON files should be updated to remove the restriction to Windows agents.