package.toml (same with builder.toml) may contain non-docker-registry dependencies, say:
[buildpack]
uri = "./"
[[dependencies]]
uri = "https://www.example.com/my-buildpack.cnb"
[[dependencies]]
uri = "./a/local/directory"
[[dependencies]]
uri = "some/local/file.cnb"
The docs say (https://buildpacks.io/docs/reference/config/package-config/):
uri: A URL or path to an archive, a packaged buildpack (saved as a .cnb file), or a directory. If path is relative, it must be relative to the package.toml.
and that all works brilliantly with pack - jam gets confused though.
Expected Behavior
for the above package.toml, jam update-buildpack exits successfully without doing anything
for a builder.toml with similar [[buildpacks]] entries, jam update-builder exists successfully without doing anything
Current Behavior
jam update-buildpack treats everything as a docker image reference and tries to get manifests ("failed to execute: failed to get buildpackage ID for ...")
jam update-builder treats everything as a docker image reference and tries to get tags ("failed to execute: failed to list tags: GET ... [map[Action:pull Class: Name:some/local/file.cnb Type:repository]]")
Possible Solution
parse uri as a URI and only contact a docker registry if it's a urn:cnb:registry:... or a docker:// URL
Steps to Reproduce
- add a non-docker
[[dependencies]] entry to a package.toml and run jam update-buildpack
- add a non-docker
[[buildpacks]] entry to a builder.toml and run jam update-builder
Motivations
we're trying to use jam on builders/buildpacks that don't necessarily have every part coming in via a docker registry
package.toml(same withbuilder.toml) may contain non-docker-registry dependencies, say:The docs say (https://buildpacks.io/docs/reference/config/package-config/):
and that all works brilliantly with
pack-jamgets confused though.Expected Behavior
for the above
package.toml,jam update-buildpackexits successfully without doing anythingfor a
builder.tomlwith similar[[buildpacks]]entries,jam update-builderexists successfully without doing anythingCurrent Behavior
jam update-buildpacktreats everything as a docker image reference and tries to get manifests ("failed to execute: failed to get buildpackage ID for ...")jam update-buildertreats everything as a docker image reference and tries to get tags ("failed to execute: failed to list tags: GET ... [map[Action:pull Class: Name:some/local/file.cnb Type:repository]]")Possible Solution
parse
urias a URI and only contact a docker registry if it's aurn:cnb:registry:...or adocker://URLSteps to Reproduce
[[dependencies]]entry to apackage.tomland runjam update-buildpack[[buildpacks]]entry to abuilder.tomland runjam update-builderMotivations
we're trying to use
jamon builders/buildpacks that don't necessarily have every part coming in via a docker registry