I have followed different recommendations, here, here , here and here. All are answered with the idea that volume mounting is supported.
I run my build in Gitlab, and we have a policy, we do not support mounting. Gitlab itself has still this open issue.
I have defined this plugin (docs):
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<verboseLogging>true</verboseLogging>
<env>
<BP_DEBUG>true</BP_DEBUG>
<BP_EMBED_CERTS>true</BP_EMBED_CERTS>
<BP_RUNTIME_CERT_BINDING_DISABLED>true</BP_RUNTIME_CERT_BINDING_DISABLED>
</env>
<bindings>
<binding>${project.basedir}/bindings/certificates:/platform/bindings/ca-certificates</binding>
</bindings>
</image>
</configuration>
</plugin>
I have the following project setup:
spring-boot-project
src
pom.xml
bindings
|-certificates
|- type
|- private-ca.pem
I get the following logs with error:
56035 [[1;34mINFO[m] [creator] Platform contents: [. bindings bindings/ca-certificates env env/BP_DEBUG env/BP_EMBED_CERTS env/BP_RUNTIME_CERT_BINDING_DISABLED]
56035 [[1;34mINFO[m] [creator] Platform Bindings: [{Name: ca-certificates Path: /platform/bindings/ca-certifi
56035 [[1;34mINFO[m] [creator] cates Type: Provider: Secret: []}]
56035 [[1;34mINFO[m] [creator] Platform Environment: map[BP_DEBUG:true BP_EMBED_CERTS:true BP_RUNTIME_CERT_BINDING_DISABLED:true]
56035 [[1;34mINFO[m] [creator] Stack: io.buildpacks.stacks.jammy
56035 [[1;34mINFO[m] [creator] Result: {Pass:true Plans:[{Provides:[{Name:watchexec}] Requires:[]}]}
56035 [[1;34mINFO[m] [creator] Writing build plans: /tmp/plan.2470190612/plan.toml <= {BuildPlan:{Provides:[{Name:watchexec}] Requires:[]} Or:[]}
56035 [[1;34mINFO[m] [creator] ======== Output: paketo-buildpacks/[email protected] ========
56035 [[1;34mINFO[m] [creator] failed to load bindings from '/platform/bindings': failed to read binding 'ca-certificates': missing 'type'
56035 [[1;34mINFO[m] [creator] ======== Output: paketo-buildpacks/[email protected] ========
56035 [[1;34mINFO[m] [creator] go.mod file is not present
56035 [[1;34mINFO[m] [creator] ======== Output: paketo-buildpacks/[email protected] ========
56035 [[1;34mINFO[m] [creator] failed to parse build configuration: no *.go files could be found
56035 [[1;34mINFO[m] [creator] ======== Output: paketo-buildpacks/[email protected] ========
Using:
mvn help:evaluate -Dexpression=project.basedir -q -DforceStdout
I know for sure that the ‘bindings/certificates; folder is resolved correctly. Locally, it works just fine. On Gitlab it does not. The BP_EMBED_CERTS option does not seem to work, what am I missing?
5