redhat-buildpacks / testing

Project aiming to help us to perform e2e tests using Buildpacks
Apache License 2.0
0 stars 3 forks source link

Artefacts downloaded are not cached when we issue x builds #48

Open cmoulliard opened 11 months ago

cmoulliard commented 11 months ago

Issue

The artefacts downloaded are not cached when we issue a second build using a PipelineRun where a volume is mounted using a pvClaimTemplate

Every time we execute a Tekton PipelineRun, the task running the lifecycle re-download by example the following JDK during the execution of the "bellsoft-liberica" buildpacks

[buildpacks : build]   BellSoft Liberica JDK 17.0.8: Contributing to layer
[buildpacks : build]     Downloading from https://github.com/bell-sw/Liberica/releases/download/17.0.8+7/bellsoft-jdk17.0.8+7-linux-amd64.tar.gz

We dont observe such a problem using the pack client

[builder]   BellSoft Liberica JDK 17.0.8: Reusing cached layer
[builder]   BellSoft Liberica JRE 17.0.8: Reusing cached layer

Are we missing a specific volume to be mounted or cache ?

Snippet code of the Tekton buildpack build step

    - name: build
      image: $(params.CNB_BUILDER_IMAGE)
      imagePullPolicy: Always
      command: ["/cnb/lifecycle/builder"]
      args:
        - "-log-level=$(params.CNB_LOG_LEVEL)"
        - "-app=$(workspaces.source.path)/$(params.SOURCE_SUBPATH)"
        - "-layers=/layers"
        - "-group=/layers/group.toml"
        - "-plan=/layers/plan.toml"
      volumeMounts:
        - name: layers-dir
          mountPath: /layers
        - name: $(params.PLATFORM_DIR)
          mountPath: /platform
        - name: empty-dir
          mountPath: /tekton/home