paketo-buildpacks / ca-certificates

A Cloud Native Buildpack that adds custom CA certificates to a build and a created image
Apache License 2.0
25 stars 11 forks source link

ERROR: failed to build: downloading buildpack #189

Closed dkirrane closed 1 year ago

dkirrane commented 1 year ago

Expected Behavior

As per docs I'm using command the command from https://paketo.io/docs/howto/java/#use-an-alternative-jvm

pack build foo --buildpack paketo-buildpacks/ca-certificates --buildpack paketo-buildpacks/azul-zulu --buildpack paketo-buildpacks/java

But I hit error

ERROR: failed to build: processing buildpacks order: unable to resolve version: multiple versions of paketo-buildpacks/ca-certificates - must specify an explicit version

Verbose logs

Builder paketobuildpacks/builder-jammy-base is now the default builder
Builder paketobuildpacks/builder-jammy-base is untrusted
As a result, the phases of the lifecycle which require root access will be run in separate trusted ephemeral containers.
For more information, see https://medium.com/buildpacks/faster-more-secure-builds-with-pack-0-11-0-4d0c633ca619
Pulling image index.docker.io/paketobuildpacks/builder-jammy-base:latest
latest: Pulling from paketobuildpacks/builder-jammy-base
Digest: sha256:011eb715c30aa716642b8659f1ca9647de6f1c8fbd7be6c97e3e52b21a3382bb
Status: Image is up to date for paketobuildpacks/builder-jammy-base:latest     
Selected run image index.docker.io/paketobuildpacks/run-jammy-base:latest
Pulling image index.docker.io/paketobuildpacks/run-jammy-base:latest     
latest: Pulling from paketobuildpacks/run-jammy-base
Digest: sha256:be469f0808bd338280f7e6f75a37ae7804e002a54ee100f104686dc148bb43a0
Status: Image is up to date for paketobuildpacks/run-jammy-base:latest
Downloading buildpack from registry: paketo-buildpacks/azul-zulu   
Refreshing registry cache for github.com//buildpacks/registry-index
Validating registry cache for github.com//buildpacks/registry-index
Creating registry cache for github.com//buildpacks/registry-index
Pulling image docker.io/paketobuildpacks/azul-zulu@sha256:79419af00c95f85c088e68808f61b2486c39a7e12a0033995970c97e95408069
docker.io/paketobuildpacks/azul-zulu@sha256:79419af00c95f85c088e68808f61b2486c39a7e12a0033995970c97e95408069: Pulling from paketobuildpacks/azul-zulu
Digest: sha256:79419af00c95f85c088e68808f61b2486c39a7e12a0033995970c97e95408069
Status: Image is up to date for paketobuildpacks/azul-zulu@sha256:79419af00c95f85c088e68808f61b2486c39a7e12a0033995970c97e95408069
Adding buildpack paketo-buildpacks/azul-zulu version 10.1.5 to builder
Setting custom order
Creating builder with the following buildpacks:
-> paketo-buildpacks/dotnet-core@0.38.0
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/dotnet-core-aspnet-runtime@0.3.19
-> paketo-buildpacks/dotnet-core-sdk@0.13.17
-> paketo-buildpacks/dotnet-execute@0.14.17
-> paketo-buildpacks/dotnet-publish@0.12.15
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/icu@0.6.14
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/node-engine@1.6.0
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/vsdbg@0.2.10
-> paketo-buildpacks/watchexec@2.8.3
-> paketo-buildpacks/go@4.4.2
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/git@1.0.6
-> paketo-buildpacks/go-build@2.0.22
-> paketo-buildpacks/go-dist@2.3.9
-> paketo-buildpacks/go-mod-vendor@1.0.21
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/watchexec@2.8.3
-> paketo-buildpacks/java-native-image@8.12.0
-> paketo-buildpacks/bellsoft-liberica@10.2.6
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/datadog@3.15.0
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/executable-jar@6.7.4
-> paketo-buildpacks/gradle@7.3.0
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/leiningen@4.6.4
-> paketo-buildpacks/maven@6.15.5
-> paketo-buildpacks/native-image@5.12.1
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/sbt@6.12.2
-> paketo-buildpacks/spring-boot@5.26.1
-> paketo-buildpacks/syft@1.32.1
-> paketo-buildpacks/upx@3.4.3
-> paketo-buildpacks/java@9.14.0
-> paketo-buildpacks/apache-tomcat@7.13.7
-> paketo-buildpacks/apache-tomee@1.7.4
-> paketo-buildpacks/azure-application-insights@5.15.1
-> paketo-buildpacks/bellsoft-liberica@10.2.6
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/clojure-tools@2.8.5
-> paketo-buildpacks/datadog@3.15.0
-> paketo-buildpacks/dist-zip@5.6.4
-> paketo-buildpacks/encrypt-at-rest@4.5.5
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/executable-jar@6.7.4
-> paketo-buildpacks/google-stackdriver@7.6.1
-> paketo-buildpacks/gradle@7.3.0
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/jattach@1.4.4
-> paketo-buildpacks/java-memory-assistant@1.4.4
-> paketo-buildpacks/leiningen@4.6.4
-> paketo-buildpacks/liberty@3.8.2
-> paketo-buildpacks/maven@6.15.5
-> paketo-buildpacks/node-engine@1.6.0
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/sbt@6.12.2
-> paketo-buildpacks/spring-boot@5.26.1
-> paketo-buildpacks/syft@1.32.1
-> paketo-buildpacks/watchexec@2.8.3
-> paketo-buildpacks/yarn@1.1.9
-> paketo-buildpacks/nodejs@1.7.0
-> paketo-buildpacks/ca-certificates@3.6.2
-> paketo-buildpacks/datadog@3.6.0
-> paketo-buildpacks/environment-variables@4.5.2
-> paketo-buildpacks/image-labels@4.5.1
-> paketo-buildpacks/node-engine@1.6.0
-> paketo-buildpacks/node-run-script@1.0.10
-> paketo-buildpacks/node-start@1.0.11
-> paketo-buildpacks/npm-install@1.1.4
-> paketo-buildpacks/npm-start@1.0.11
-> paketo-buildpacks/procfile@5.6.3
-> paketo-buildpacks/watchexec@2.8.2
-> paketo-buildpacks/yarn@1.1.9
-> paketo-buildpacks/yarn-install@1.1.3
-> paketo-buildpacks/yarn-start@1.0.11
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/python@2.13.0
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/conda-env-update@0.7.11
-> paketo-buildpacks/cpython@1.8.11
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/miniconda@0.8.4
-> paketo-buildpacks/pip@0.17.4
-> paketo-buildpacks/pip-install@0.5.16
-> paketo-buildpacks/pipenv@1.18.0
-> paketo-buildpacks/pipenv-install@0.6.17
-> paketo-buildpacks/poetry@0.6.4
-> paketo-buildpacks/poetry-install@0.3.16
-> paketo-buildpacks/poetry-run@0.4.18
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/python-start@0.14.11
-> paketo-buildpacks/watchexec@2.8.3
-> paketo-buildpacks/ruby@0.38.1
-> paketo-buildpacks/bundle-install@0.7.9
-> paketo-buildpacks/bundler@0.7.21
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/mri@0.14.5
-> paketo-buildpacks/node-engine@1.6.0
-> paketo-buildpacks/passenger@0.10.3
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/puma@0.4.31
-> paketo-buildpacks/rackup@0.4.30
-> paketo-buildpacks/rails-assets@0.9.1
-> paketo-buildpacks/rake@0.4.30
-> paketo-buildpacks/thin@0.5.30
-> paketo-buildpacks/unicorn@0.4.30
-> paketo-buildpacks/yarn@1.1.9
-> paketo-buildpacks/yarn-install@1.1.3
-> paketo-buildpacks/web-servers@0.17.1
-> paketo-buildpacks/ca-certificates@3.6.3
-> paketo-buildpacks/environment-variables@4.5.3
-> paketo-buildpacks/httpd@0.7.11
-> paketo-buildpacks/image-labels@4.5.2
-> paketo-buildpacks/nginx@0.15.3
-> paketo-buildpacks/node-engine@1.6.0
-> paketo-buildpacks/node-run-script@1.0.10
-> paketo-buildpacks/npm-install@1.1.4
-> paketo-buildpacks/procfile@5.6.4
-> paketo-buildpacks/source-removal@0.2.0
-> paketo-buildpacks/watchexec@2.8.3
-> paketo-buildpacks/yarn@1.1.9
-> paketo-buildpacks/yarn-install@1.1.3
-> paketo-buildpacks/azul-zulu@10.1.5
Adding buildpack paketo-buildpacks/azul-zulu@10.1.5 (diffID=sha256:13c862b30ccfa2559c47d0feadf32f7470b5f1c91953f8ae3bb39c0bb61a3654)
ERROR: failed to build: processing buildpacks order: unable to resolve version: multiple versions of paketo-buildpacks/ca-certificates - must specify an explicit version
dmikusa commented 1 year ago

pack build foo --buildpack paketo-buildpacks/ca-certificates --buildpack paketo-buildpacks/azul-zulu --buildpack paketo-buildpacks/java

This happens sometimes, you just need to tell it exactly which buildpack to load. You've told it to pull in the latest paketo-buildpacks/ca-certificates, but there may also be one or more versions in the builder. Most of the time, these should all be the same, but at times because of varying release cycles can differ.

You can disambiguate by setting the version in your build command:

pack build foo --buildpack paketo-buildpacks/ca-certificates@3.6.3 --buildpack paketo-buildpacks/azul-zulu --buildpack paketo-buildpacks/java

Give that a try and let me know if it doesn't work.

dkirrane commented 1 year ago

Yip that works. Where can the version the version used by the builder?

dmikusa commented 1 year ago

You can pack builder inspect a builder image to see what versions are included. The error message also has the versions listed, but they are all mixed together.