Search code examples
tfsartifactoryreleasejfrog-cli

Artifactory: TFS Release task won't download, but corresponding jfrog-cli command works fine


I'm using:

  • TFS 2017 Update 3
  • JFrog.jfrog-artifactory-vsts-extension-1.6.2
  • jfrog-cli version: 1.26.2

If I log into the build server using the build service account, and execute the following command line, it works:

D:\agent\TFS_AGENT_work\r2\a>d:\agent\TFS_AGENT_work\_jfrog\current\jfrog.exe rt dl --url=http://FQDN:PORT/artifactory/ --recursive --include-dirs=true --user=USER --password=PASSWORD {black-box}/{grey-box}/ "d:\\agent\\TFS_AGENT_work\\r2\\a/"

The "{black-box}" and "{grey-box}" are the same as the colored boxes in the screenshots below.

Here's what the release task looks like: enter image description here

Here's the artifactory service config: enter image description here

If I add a trailing / at the end of the server URL, like I have in my command, the connection verification fails.

The release tasks seems like it runs fine, but the files are not actually downloaded. Here's the output :

... enter image description here ... output-of-release-task

I tried this many times. I verified each time that the files were definitely not downloaded.

I also tried:

  • adding "/" at the front of my {black-box} in the Spec, thinking maybe there was a missing slash after the artifactory url, but that didn't help
  • removing the trailing "/" in the "target" json.

Solution

  • include-dirs doesn't go in props; I must have misread the docs earlier

    {
      "files": [
        {
          "pattern": "{black-box}/{grey-box}/",
          "target": "$(Agent.ReleaseDirectory)\\",
          "recursive": "true",
          "include-dirs": "true"
        }
      ]
    }