spring-boot-maven-plugin with paketo buildpacks does not perform binding in Gitlab pipeline

473 views Asked by At

I am using paketo buildpacks with spring-boot-maven-plugin and I want to copy some files from a specific folder into the image. If I am running spring-boot:build-image locally it works fine and I can inspect the image and see the files there, however, when the image is being built in a Gitlab CI pipeline, doesn't seem to add the files. The files are checked in so there is no need to download them from somewhere. I am using Docker socket binding as runner.

pom.xml

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <image>
           <builder>docker.io/paketobuildpacks/builder:tiny</builder>
                <buildpacks>
                    <buildpack>gcr.io/paketo-buildpacks/adoptium:latest</buildpack>
                    <buildpack>gcr.io/paketo-buildpacks/syft:latest</buildpack>
                    <buildpack>gcr.io/paketo-buildpacks/executable-jar:latest</buildpack>
                    <buildpack>gcr.io/paketo-buildpacks/spring-boot:latest</buildpack>
                    <buildpack>gcr.io/paketo-buildpacks/ca-certificates:latest</buildpack>
                    <buildpack>gcr.io/paketo-buildpacks/dist-zip:latest</buildpack>
                    <buildpack>gcr.io/paketo-buildpacks/image-labels:latest</buildpack>
                </buildpacks>
         <bindings>                          
            <binding>${project.basedir}/src/folder:/workspace/CONTAINER-INF/folder:ro</binding>
         </bindings>
        </image>
    </configuration>
</plugin>

gitlab_ci.yml

stage: etc
image: maven:3.8.3-openjdk-17
variables:
    DOCKER_HOST: '/var/run/docker.sock'
script:
  - mvn spring-boot:build-image
0

There are 0 answers