Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps Pipeline rootdirectory

I'm trying to get the dist file from my project in Azure DevOps with the rootdirectory. But no matter what I do, I continue to get this error:

##[error]Error: ENOENT: no such file or directory, stat >'D:\a\1\s\dist'

##[error]Ftp Upload failed

##[warning]Could not find any files to upload

I've tried multiple things in order to solve it, but it doesn't seem to work. Examples of what I tried are putting those lines in the rootdirectory:

'.'

$(Pipeline.Workspace)

$(System.DefaultWorkingDirectory)/rootFolderName

I found those lines in a StackOverflow post, but it keeps sending the wrong files into my FTP server.

like image 248
Robin Doorenbosch Avatar asked Feb 22 '26 05:02

Robin Doorenbosch


1 Answers

To access the files in your repository, you should use the following:

$distFilePath = "$(Build.SourcesDirectory)/$folderName/$distFileName"
like image 148
Nadine Raiss Avatar answered Feb 25 '26 13:02

Nadine Raiss



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!