Azure-pipelines-agent: VSTS build task extension based on PowerShell Script not runnung on Linux/MacOS hosted agents

Created on 15 Feb 2018  Â·  8Comments  Â·  Source: microsoft/azure-pipelines-agent

Agent version and platform

Version of your agent? VSTS latest linux and OSX hosted agents

OS of the machine running the agent? OSX/Linux

VSTS type and version

VisualStudio.com

VisualStudio.com account name: http://javiersalado.visualstudio.com

What's not working?

I have seen that hosted Linux and OSX agents in VSTS have Powershell installed, and in fact, running builds with a PowerShell taks in them work perfectly in any hosted agent.

How ever I have written an extension adding a build task based on PowerShell and it doesn't run in eith linux nor OSX hosted agents. This is the error log from a Linux agent:

2018-02-14T12:48:12.6107755Z ##[section]Starting: Kiuwan baseline analysis
2018-02-14T12:48:12.6377260Z ==============================================================================
2018-02-14T12:48:12.6390993Z Task : Kiuwan Baseline Analysis
2018-02-14T12:48:12.6403887Z Description : Run a Kiuwan baseline Kiuwan analysis on the source code extracted by the build configuration.
2018-02-14T12:48:12.6416906Z Version : 1.2.0
2018-02-14T12:48:12.6429897Z Author : Javier Salado
2018-02-14T12:48:12.6458012Z Help : WARNING: Make sure you define the Kiuwan credentials variables in the build definition KiuwanUser and KiuwanPasswd. Otherwise the analysis will fail.
2018-02-14T12:48:12.6473006Z ==============================================================================
2018-02-14T12:48:12.7353222Z ##[error]A supported task execution handler was not found. This error usually means the task does not carry an implementation that is compatible with your current operating system. Contact the task author for more details.
2018-02-14T12:48:12.7425917Z ##[section]Finishing: Kiuwan baseline analysis

Why is it compatible if you have powerShell in the provisioned agent? Is this going to be supported any time soon?

Thanks in advance,
J.

question

Most helpful comment

Any update on this issue? I can't find any Powershell Core task .

All 8 comments

The powershell handler in the task model is for windows powershell. Even though powershell core is now available (it wasn't when our tasks started), many tasks written in powershell have windows assumptions.

We will add a new handler type for powershell core.

If you want, you can create an enhancement issue in the vsts-task-lib repo.

Hi Bryan,

thanks for the answer. I will open the enhancement to add the powershell
handler: I don't think it will hurt to have it, it will give everyone more
options to implement tasks. I guess we will just have to code our ps
scripts without any windows assumption or make the OS aware ;-)

Cheers,
J.

On Thu, Feb 15, 2018 at 8:52 PM, Bryan MacFarlane notifications@github.com
wrote:

Closed #1416 https://github.com/Microsoft/vsts-agent/issues/1416.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vsts-agent/issues/1416#event-1476644108,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMVXPXHP1bzmDaK92oTUOQ4v5bGnEB-Qks5tVIrqgaJpZM4SGnZG
.

Any update on this issue? I can't find any Powershell Core task .

any updates ???

Is the Powershell Core handler going to be implemented?

We've deprioritized the work to deliver a PowerShell Core handler. I suggest you use the Node handler for cross-platform tools.

@vtbassmatt Any update on this?

We are not planning to deliver a PowerShell Core handler.

Was this page helpful?
0 / 5 - 0 ratings