Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior of Azure PowerShell Task v4 on Windows and non-Windows agents is different #10722

Closed
ghost opened this issue Jun 21, 2019 · 4 comments
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Jun 21, 2019

Bug
Type: completely different behavior on Windows and non-Windows agents

Enter Task Name: Azure PowerShell

Environment

  • Agent - Hosted: Ubuntu or Windows Server 2019

Issue Description

The task has a very different behavior on Windows and non-Windows agents which is very weird.
I noticed the following:

  • Azure PowerShell runs on Windows PowerShell (vs. PowerShell Core on Linux) with no option to change it also to Core on Windows. See Azure PowerShell Task v4 on Windows needs option to run on PowerShell core #10328
  • Working directory is not the same. On Linux it is the $(Build.SourcesDirectory) on Windows it seems the directory of the task itself, which makes no sense IMHO. (D:\a_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\4.0.12)
  • On Linux the task runs Set-AzContext -SubscriptionId... which it seems not to do on Windows. It has probably something to to with Azure PowerShell v4 task is not setting Azure Context in Linux  #10359. The problem here is that the task generates an error when the Service Connection has a scope level of "ManagemetGroup". However the task runs, with the same Service Connection, without any error on a Windows agent.

Can the task please changed in a way that it behaviors the same on Linux and Windows so the task does not making the whole pipeline to fail just because the agent is changed form Linux to Windows (or wise versa).

Thanks.

@20shivangi
Copy link
Contributor

@jfemobi
For first one, we will be supporting PowerShell Core in windows for AzurePowerShell task. It might take 4-5 weeks to provide the support.

For third one, issue has been fixed in latest version 4.0.13. Please verify it.

@MisinformedDNA
Copy link
Contributor

@20shivangi What is the status of using PS Core on the Azure PS task?

@20shivangi
Copy link
Contributor

@MisinformedDNA
The support of PowerShell core in Windows for task AzurePowerShellV4 is recently added. It will take at least 3-4 weeks to get deployed.
Merged PR : #11326

@20shivangi
Copy link
Contributor

The change has been rolled out, thereby closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants