Closed swiknaba closed 1 year ago
Check if you have an environment variable value with spaces in it.
For example SOME_ENV_VAR='abc qwert'
We had the same issue and we fixed it by removing the spaces from the environment variable.
Like @swiknaba stated this was working just fine in version 7.3.0
.
Here is the output if anyone wants to submit the fix.
+ docker --context builder buildx build -f ./Dockerfile --platform linux/amd64,linux/arm64 --progress plain --push --build-arg DEBUG=true --build-arg 'SOME_ENV_VAR=abc' 'qwert' .
error: "docker buildx build" requires exactly 1 argument.
and the config file is
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@8.2.1
jobs:
build:
executor: aws-ecr/default
steps:
- aws-ecr/build-and-push-image:
repo: ${CIRCLE_PROJECT_REPONAME,,}
tag: ${CIRCLE_TAG}
platform: linux/amd64,linux/arm64
extra-build-args: --build-arg DEBUG=true --build-arg SOME_ENV_VAR=${SOME_ENV_VAR}
...
@VladaPetrovic, thanks for your reply. I've double checked, and we have no spaces in any ENV VAR 🥲
I can confirm same issue for our project. Multiple extra-build-args
result in an error in 8.2.1
. Working fine on 7.3.0
.
ERROR: "docker buildx build" requires exactly 1 argument.
my config:
extra-build-args: '--build-arg FIRST_ENV="$FIRST_ENV" --build-arg SECOND_ENV="$SECOND_ENV"'
Orb version
8.2.1
What happened
See issue https://github.com/CircleCI-Public/aws-ecr-orb/issues/182 Which supposedly was fixed in https://github.com/CircleCI-Public/aws-ecr-orb/pull/254 released under version 8.2.1
I just upgraded from 7.3.0 to 8.2.1, and I still experience the same bug, namely:
My config file:
Variations tried:
Expected behavior
extra-build-args
should work to pass--build-arg
parameters like 7.3.0 did, allowing to pass multiple build args.