Closed cmoulliard closed 1 year ago
The error is occuring in a part of the script that's trying to take all the current env vars and convert them into platform env files, except for a few on a block list.
I'm guessing that somehow there's a rather odd env var in the environment that seems to have the name target/quarkus-app/*.jar
.. although that really does seem unlikely.
Dump the env to see what's in there, or maybe try flipping the -c
on line 75 for a -x
to have it run the script in debug mode where it'll display the lines it's executing
Seeing your comment in slack may have provided further info..
-DBP_MAVEN_BUILT_ARTIFACT="target/quarkus-app/lib/ target/quarkus-app/*.jar target/quarkus-app/app/ target/quarkus-app/quarkus/" \
I'm guessing this is in the env, which makes me suspect that the loop that's processing those env vars isn't handling spaces in the env value well.. try testing that loop locally with variations of that env var (with or without enclosing double or single quotes etc).. suspect it will fail and at somepoint end up treating the values after the spaces as if they were additional env keys, which leads the inevitable failure when it attempts to use the key as part of a filename.
Fixed with new BuildStrategy.yml definition
Issue
BuildRun fails and reports as error:
when we use as Task definition: https://github.com/redhat-buildpacks/testing/blob/main/k8s/shipwright/secured/clusterbuildstrategy.yml