Examples of Placeholders with File Specs

JFrog Integrations Documentation

Content Type
Integrations
ft:sourceType
Paligo

Example 1: Download all files located under the all-my-frogs directory in the my-local-repo repository to the froggy/all-my-frogs directory.

{
    "files": [
        {
            "pattern": "my-local-repo/all-my-frogs/",
            "target": "froggy/"
        }
    ]
}

Example 2: Download all files retrieved by the AQL query to the local/output directory.

{
  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "my-local-repo",
          "$or": [
            {
              "$and": [
                {
                  "path": {
                    "$match": "."
                  },
                  "name": {
                    "$match": "a1.in"
                  }
                }
              ]
            },
            {
              "$and": [
                {
                  "path": {
                    "$match": "*"
                  },
                  "name": {
                    "$match": "a1.in"
                  }
                }
              ]
            }
          ]
        }
      },
      "target": "local/output/"
    }
  ]
}

Example 3: Upload

  1. All zip files located under the resources directory to the zip folder, under the all-my-frogs repository.

    AND

  2. All TGZ files located under the resources directory to the tgz folder, under the all-my-frogs repository.

  3. Tag all zip files with type = zip and status = ready.

  4. Tag all tgz files with type = tgz and status = ready.

{
  "files": [
    {
      "pattern": "resources/*.zip",
      "target": "my-repo/zip/",
      "props": "type=zip;status=ready"
    },
    {
      "pattern": "resources/*.tgz",
      "target": "my-repo/tgz/",
          "props": "type=tgz;status=ready"
    }
  ]
}

Example 4: Download all files located under the all-my-frogs directory in the my-local-repo repository except for the '.zip' files and the 'props.' files

{
  "files": [
    {
      "pattern": "my-local-repo/all-my-frogs/",
          "excludePatterns": [
                "*.zip", 
                "all-my-frogs/props.*"
                ]
    }
  ]
}

Example 5: Download the three oldest zip files from the my-local-repo repository, into local/output directory.

{
  "files": [
    {
      "pattern": "my-local-repo/*.zip",
      "sortBy": ["created"],
      "limit": 3,
      "target": "local/output/"
    }
  ]
}

Example 6: Download the three oldest zip files from the my-local-repo repository, into local/output directory. This File Spec uses AQL.

{
  "files": [
    {
      "aql": {
        "items.find": {
          "repo": "my-local-repo",
          "$or": [
            {
              "$and": [
                {
                  "path": {
                    "$match": "*"
                  },
                  "name": {
                    "$match": "*.zip"
                  }
                }
              ]
            }
          ]
        }
      },
      "sortBy": ["created"],
      "limit": 3,
      "target": "local/output/"
    }
  ]
}

Example 7: Download the artifacts from the generic-local repository, which belong to the following build, which had been published to Artifactory - Build name: my-build and build number: 10.

{
  "files": [
    {
      "pattern": "generic-local",
      "build": "my-build/10"
    }
  ]
}

Example 8: Download the artifacts from the generic-local repository, which belong to the my-build build, which had been published to Artifactory. The artifacts of the latest build number published to Artifactory will be downloaded.

{
  "files": [
    {
      "pattern": "generic-local",
      "build": "my-build"
    }
  ]
}