Closed ameyer-pivotal closed 4 years ago
This is a result of the detection logic: https://github.com/buildpacks/lifecycle/blame/3b41bc40cc1eca7aeca47b4612b01f2d348a12d5/detector.go#L256-L258
Given two buildpacks of the same ID and different versions, at the moment only one will be considered for detection.
The buildpacks in your zip file have the same ID.
When I modified the ID, this works as intended:
sing build cache volume pack-cache-883267f9b9ea.build
===> CREATING
[creator] ---> DETECTING
[creator] ======== Results ========
[creator] pass: custom.buildpack@0.0.1
[creator] pass: paketo-buildpacks/bellsoft-liberica@2.5.3
[creator] skip: paketo-buildpacks/gradle@1.2.0
[creator] pass: paketo-buildpacks/maven@1.4.0
[creator] skip: paketo-buildpacks/sbt@1.2.0
[creator] pass: paketo-buildpacks/executable-jar@1.2.3
[creator] pass: paketo-buildpacks/apache-tomcat@1.1.3
[creator] pass: paketo-buildpacks/dist-zip@1.3.0
[creator] pass: paketo-buildpacks/spring-boot@1.5.3
[creator] skip: paketo-buildpacks/procfile@1.3.3
[creator] skip: paketo-buildpacks/azure-application-insights@1.1.3
[creator] skip: paketo-buildpacks/debug@1.2.3
[creator] skip: paketo-buildpacks/google-stackdriver@1.1.3
[creator] skip: paketo-buildpacks/jmx@1.1.3
[creator] skip: paketo-buildpacks/encrypt-at-rest@1.2.3
[creator] skip: paketo-buildpacks/image-labels@1.0.3
[creator] pass: custom.buildpack2@0.0.2 <-------------- different ID
@zmackie 🤦I should have tried that. Thanks!
Summary
Supplying a custom buildpack via the
--buildpack
flag both before and after a--buildpack from=all
only applies one of the provided buildpacks.Reproduction
Steps
From the
bug
directory, after extracting the attached zip (this directory contains two very simple buildpacks that always pass detection):Current behavior
Detection only applies custom buildpack 0.0.1:
Expected behavior
Custom buildpack 0.0.1 should be applied before the builder's buildpacks, and custom buildpack 0.0.2 should be applied after:
Environment
pack info