简体   繁体   中英

Azure Pipelines Environment variables not working for PowerShell on Target Machines

I'm unable to get the environment variables (for example $env:RELEASE_RELEASENAME ) for a task that runs a PowerShell script on a target machine, however, the env variables work for PowerShell Inline.

Does getting env variables from PowerShell on target machines need special treatment or am I missing something here?

Sometimes, I met this problem with Ubuntu hosted agent. My solution is to manually add the environment, then I can get the environment variable in inline script or script file.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM