Reputation: 1973
In an Azure Devops Build pipeline, I'm setting an environment variable in Powershell, like below:
And i know the variable works in another powershell task, because of this test:
But I'm not able to actually use this in another, non-powershell task. See this docker build/push task where i'm trying to add a tag. I get an error saying that it can't find that variable. Is my notation wrong somehow? I've tried multiple different variations on the screen shot below, but none have worked.
Upvotes: 1
Views: 1716
Reputation: 146
The notation $env:LOCALTAG
is powershell specific. I think you should use the macro syntax $(LOCALTAG)
(without $env
)
Upvotes: 2