I have a PowerShell task that processes published artifacts from another stage.
I have noticed these are put into a folder "s". Random sampling shows its "s" all the time but I doubt if it will be the case always!
Wondering what's the best way to refer to these files safely?
Here's my publish artifacts task:
Published artifacts:
And the PowerShell task that consumes these artifacts:
The predefined variable you are looking for is $(System.DefaultWorkingDirectory). Please refer to the documentation to see this variables definition
The variable that you use does not work with the s
folder. As described on the documentation Build.ArtifactStagingDirectory
is the local path on the agent where any artifacts are copied to before being pushed to their destination. For example: c:\agent_work\1\a
. You will find those files under a
folder. The folder that is referred with the s
letter is where the sources are downloaded Build.SourcesDirectory
.
https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml
Documentation on Azure devops predfined variables that can be used and where the folders are located.
https://blog.geralexgr.com/devops/how-azure-devops-pipelines-agent-works
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.