redhat-buildpacks / testing

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

shipwright job -> bash: line 2: results.APP_IMAGE_DIGEST.path: command not found #41

Closed cmoulliard closed 1 year ago

cmoulliard commented 1 year ago

Issue

Buildpack shipwright job reports such a bash error

Paketo Buildpack for Executable JAR 6.7.4
  https://github.com/paketo-buildpacks/executable-jar
  Process types:
    executable-jar: java -jar /workspace/source/getting-started/quarkus-run.jar (direct)
    task:           java -jar /workspace/source/getting-started/quarkus-run.jar (direct)
    web:            java -jar /workspace/source/getting-started/quarkus-run.jar (direct)
Timer: Builder ran for 47.714855808s and ended at 2023-08-28T16:14:52Z
...
bash: line 2: results.APP_IMAGE_DIGEST.path: command not found
cmoulliard commented 1 year ago

Adding double quotes dont help at all

    - name: results
      image: docker.io/library/bash:5.1.4
      args:
        - -c
        - |
          set -e
          cat /layers/report.toml | grep "digest" | cut -d'"' -f2 | cut -d'"' -f2 | tr -d '\n' | tee "$(results.APP_IMAGE_DIGEST.path)"
      volumeMounts:
        - name: layers-dir
          mountPath: /layers

as bash reports

bash: line 2: results.APP_IMAGE_DIGEST.path: command not found
tee: : No such file or directory
cmoulliard commented 1 year ago

The problem is coming from what it is described here as currently the images results variables (digest, size, etc) are not the same between Shipwright shp-imlage-xxx and Tekton.

Fixed with: c8ce0e7, ebc6d01