'How to use regex pattern for Artifactory upload

I'm using Generic-Artifactory Integration option to upload our artifacts to the Jfrog Artifactory as part of Jenkins build.

The format of the file to be uploaded is like - service-api-calls-2.0.2.tar.gz or service-service-tmp-2.0.29.tar.gz or service-raw-changes-2.0.200.tar.gz, in which, the 3rd digit is the jenkins build number and can go on till 1500.

Spec source detail,

{
  "files": [
    {
      "pattern": "**/service-*[0-9].[0-9].[0-9]+.tar.gz",
      "target": "service-repo/binaries/feature_checkout/",
      "flat" : "true"
    }
  ]
}

But its not matching any of the required tar.gz, where am I going wrong ?

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source