0
votes

We are using JFrog Artifactory with TFS 2017 and I am looking to use the JFrog Artifactory Deployer task with my build. Looking to upload artifacts from a shared UNC part. Whilst it works fine when uploading artifacts from local file system, it doesn't work with UNC path. I tried using mapped drive but that didn't work either. Does anyone know a solution for this?

Getting the following error

running 'C:\agent_work\16\a\jfrog.exe' rt upload '\myshared\drops\BuildName\BuildVersion\**\*.zip' 'ext-repo' --url=https://aritfactory/artifactory --user=******** --password=******** --props='build.number=2996783;build.name=ArtifactoryUpload' 2017-05-22T15:23:06.5911571Z 2017-05-22T15:23:06.5911571Z 2017-05-22T15:23:06.8240199Z Pinging Artifactory... 2017-05-22T15:23:07.0369535Z Done pinging Artifactory. 2017-05-22T15:23:07.0369535Z Path does not exist: \myshared\drops\buildName\BuildVersion 2017-05-22T15:23:07.0838234Z

[error]Microsoft.PowerShell.Commands.WriteErrorException: Deployment to Artifactory failed 2017-05-22T15:23:07.0994475Z ##[error]PowerShell

script completed with 1 errors. 2017-05-22T15:23:07.0994475Z

[section]Finishing: JFrogArtifactoryDeployer

3
What's the result if you run jfrog command with a shared folder manually?starian chen-MSFT
It's the same errorHamid Shahid
So, I think the shared folder is not supported for jfrog, you need to copy files.starian chen-MSFT

3 Answers

0
votes

You can copy files to a local folder by using Copy Files or Windows Machine File Copy task, then upload artifacts.

0
votes

Another workaround is that adding a powershell script task in your build definition to map the network drive and then publish to artifacts. I just did a quick test with it and it works. the powershell script I used:

New-PSDrive -Name "G" -PSProvider "FileSystem" -Root "\\UNC\Path"

cd G:\

./jfrog.exe rt upload folder\\file.txt 'example-repo-local' --url=https://xxxxx.jfrog.io/xxxx/example-repo-local/ --user='xxxxx' --password='xxxxx' --props='build.number=001;build.name=BuildName'

Remember to download the "jfrog.exe" and place it in the UNC Path.

0
votes

I think the easiest solution would be to make a symbolic link of the data folder and copy the contents of the data folder into the symbolic link than restart Artifactory.