aws-ecr-orb icon indicating copy to clipboard operation
aws-ecr-orb copied to clipboard

Build arguments not working

Open ConradKurth opened this issue 2 years ago • 1 comments

Orb version

8.1.2

What happened

When I upgrade from v7.x.x to the last 8.1.2 my --build-arg is now failing. We are cat'ing a file to inject information into the docker file.

Example would be

extra-build-args: '--build-arg VERSION=$(cat version.txt)'

I noticed that when i run this locally based off your bash script it seems to consider --build-arg VERSION as the first argument and not a split pair of flag and then argument.

I was testing with this command

PARAM_EXTRA_BUILD_ARGS='--build-arg VERSION=$(cat version.txt)' PARAM_EXTRA_BUILD_ARGS=$(eval echo "${PARAM_EXTRA_BUILD_ARGS}") && \
set -- "$@" ${PARAM_EXTRA_BUILD_ARGS} && \
docker build -t test "$@" .

The error is unknown flag: --build-arg VERSION

Expected behavior

It should work how it does it 7.x.x

ConradKurth avatar Jun 15 '22 00:06 ConradKurth

@ConradKurth looking at your issue, almost looks like the unknown flag error is from the docker build command, did you ever get this sorted out?

acorncom avatar Sep 15 '22 10:09 acorncom