Skip to content

path template may not match all of an artifact name when similar artifact is present #516

@dlinsley

Description

@dlinsley

Describe the bug

Using an artifactory source

Files that do not fully match the path template can be recommended if they sufficiently match the {{.Name}} and {{.Version}} fields.

I do not know if this is artifactory release source specific yet,

Reproduction steps

Using Kiln 0.99.0

  1. have a Kiln file reference an artifactory release source where the path template expects compiled bosh releases
    ex: bosh-releases/compiled/{{.Name}}-{{.Version}}-{{.StemcellOS}}-{{.StemcellVersion}}.tgz
  2. have release source (bosh-releases/compiled) have following files where StemcellOS: smoothie, StemcellVersion: 9.9:
  • mango-2.3.4-notices.zip
  • mango-2.3.4-smoothie-9.9.tgz
  1. kiln find-release-version -r mango would return 2.3.4
  2. kiln update-release -n mango --version 2.3.4 updates the Kilnfile.lock

Expected behavior

Kilnfile.lock should reference mango-2.3.4-smoothie-9.9.tgz but instead references: mango-2.3.4-notices.zip

Expected all of the path template to be evaluated / match. But it looks like it just matched {{.Name}} and {{.Version}}, and ignored the stemcell parameters and suffix .tgz

Additional context

Updated tests that exhibit the behavior available on branch : artifactory-path-template-tests

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions