Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-16464

pathFilter does not evaluate correctly; path Token does not match at all

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Not a Bug
    • Affects Version/s: 5.9.4
    • Fix Version/s: None
    • Labels:
      None

      Description

      Setting ${path:1} for the Package rule (Bintray Output section) in a distribution repository will fail out, despite setting a correct pathFilter, as we can see below the token cannot match:

      2018-04-19 10:22:54,029 [art-exec-106] [DEBUG] 
      (o.a.a.b.d.r.DistributionCoordinatesResolver:240) - Found token '${dockerTag}' in version field: '${dockerTag}' for artifact 'docker-local-1/mysql/1.2.1/manifest.json'. replacing with value 1.2.1
      2018-04-19 10:22:54,030 [art-exec-106] [DEBUG] (o.a.a.b.d.r.DistributionCoordinatesResolver:240) - Found token '${artifactPath}' in path field: '${artifactPath}' for artifact 'docker-local-1/mysql/1.2.1/manifest.json'. replacing with value mysql/1.2.1/manifest.json
      2018-04-19 10:22:54,030 [art-exec-106] [ERROR] (o.a.a.b.d.r.DistributionCoordinatesResolver:331) - Coordinate Field package in rule 'Docker-default' contains tokens that were not matched: ${path:1} for artifact docker-local-1/mysql/1.2.1/manifest.json, failing this rule.
      2018-04-19 10:22:54,033 [art-exec-106] [DEBUG] (o.a.b.d.BintrayVersionPathsMapper:64) - Paths resolved to coordinates: {}
      2018-04-19 10:22:54,033 [art-exec-106] [ERROR] (o.a.b.d.DistributorImpl:92) - No valid paths to distribute to Bintray, aborting.
      

      In 5.4.0 it can match correctly:

      (o.a.a.b.d.r.DistributionCoordinatesResolver:232) - Found token '${dockerTag}' in version field: '${dockerTag}' for artifact 'docker-local-1/mysql/1.2.1/manifest.json'. replacing with value 1.2.1
      2018-04-19 18:46:25,358 [art-exec-398] [DEBUG] (o.a.a.b.d.r.DistributionCoordinatesResolver:232) - Found token '${artifactPath}' in path field: '${artifactPath}' for artifact 'docker-local-1/mysql/1.2.1/manifest.json'. replacing with value mysql/1.2.1/manifest.json
      2018-04-19 18:46:25,358 [art-exec-398] [DEBUG] (o.a.a.b.d.r.DistributionCoordinatesResolver:246) - Found group token ${path:1}in package field: '${path:1}' for artifact 'docker-local-1/mysql/1.2.1/manifest.json' and rule Docker-default. trying to parse group number
      

      Reproduction Steps:
      Upload docker image to Artifactory e.g. docker push $<ART_URL>/docker-local-1/mysql:1.2.1
      Create Distribution Repository, set rule:
      Path Filter:

       mysql/(.*)/(.*) 

      Package: ${path:1}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              loreny Loren Yeung
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: