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

Support Powershell Core #64

Closed
BenoityipMSFT opened this issue Oct 1, 2021 · 5 comments
Closed

Support Powershell Core #64

BenoityipMSFT opened this issue Oct 1, 2021 · 5 comments
Labels
wontfix This will not be worked on

Comments

@BenoityipMSFT
Copy link

Is your feature request related to a problem? Please describe.
My client does not want to install the old Powershell in the build machine. Only Powershell Core is installed

Describe the solution you'd like
A check box in the component to support Powershell Core

Describe alternatives you've considered
I am planning to call adf tools powershell script directly in the Powershell Task in Release pipeline, but not sure if it works

Additional context
Add any other context or screenshots about the feature request here.

@jikuja
Copy link

jikuja commented Oct 3, 2021

Only Powershell Core is installed

Works on my Mac and on MS Hosted Azure DevOps Linux build agents. More information is probably needed.

@NowinskiK
Copy link
Member

Many times I use PS 7.1.x and it works perfectly.
@BenoityipMSFT, what exactly problem do you experience?

@BenoityipMSFT
Copy link
Author

BenoityipMSFT commented Oct 4, 2021

My apology, this issue should be posted in "Publish Data Factory" in here

The error I am getting is
"Could not find the modules: 'Az.Accounts' with Version: ''. If the module was recently installed, retry after restarting the Azure Pipelines task agent."

I have asked the client to install Latest Az, but his response is
"The non-powershell Core version in the build machine will contain the older AZ. Projects that need the newer AZ are asked to use Powershell Core." He is reluctant to install latest Az on non-powershell Core, because it might break the build in existing software, so he is asking me to redirect the code to use latest Powershell Core.

so I am asking whether a way in the module to see whether we can redirect the module to use Powershell Core in the "Publish ADF" module? Screenshot is attached
image

image

@NowinskiK NowinskiK transferred this issue from Azure-Player/azure.datafactory.tools Oct 6, 2021
@jikuja
Copy link

jikuja commented Oct 6, 2021

Currently, there are no workarounds/option to make PowerShell-based tasks to support PowerShell core, and the situation is not going to get fixed. ref: microsoft/azure-pipelines-task-lib#314

It is possible to write task entrypoint with typescript but then there would be two entrypoints to maintain unless migrating from PowerShell entrypoint to typescript only.

The workaround I used for Linux-based runners:
Just use AzurePowershell task, install the tool and then run CmdLet to test or deploy JSONs.

@NowinskiK
Copy link
Member

NowinskiK commented Oct 6, 2021

Related to #24
TBH, I'm not really keen to invest my private time to develop some workaround just because Microsoft won't invest their resources to resolve this for many people, customers, community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants