CircleCI-Public / aws-ecr-orb

CircleCI orb for interacting with Amazon's Elastic Container Registry (ECR)
https://circleci.com/orbs/registry/orb/circleci/aws-ecr
MIT License
80 stars 142 forks source link

Orb version 8.2.0 does not recognize build-args #253

Closed mrexhepi closed 1 year ago

mrexhepi commented 1 year ago

Orb version

8.2.0

What happened

Build it does not recognize any args that previous version was recognizing under extra-build-args, and I do not see any change at this part of the config .

Error as below:

+ docker buildx build -f ./Dockerfile -t ********************************************/blabla-api-dev:latest -t ********************************************/blabla-api-dev:4dc999c7438cc485c2842f7500d335cf01b2a7d3 --platform linux/amd64 --progress plain --push '--build-arg BRANCH_NAME=dev --build-arg NPM_TOKEN=****************************************' .
unknown flag: --build-arg BRANCH_NAME
See 'docker buildx build --help'.

Config file:

  aws_ecr_build_image: &aws_ecr_build_image
      aws-ecr/build-image:          
          registry-id: AWS_ECR_REGISTRY_ID
          repo: 'blabla-api-dev'
          region: '${AWS_REGION}'
          tag: buildonly
          extra-build-args: '--build-arg NPM_TOKEN=${NPM_TOKEN}'
          push-image: false      

Expected behavior

This should run smoothly .

blatinier commented 1 year ago

Same here. Configuration being

  release-staging:
    executor:
      name: aws-ecr/default
    steps:
      - aws-ecr/build-and-push-image:
          path: backend 
          dockerfile: Dockerfile-prod
          repo: my-docker-registry
          tag: staging-${CIRCLE_SHA1},staging-latest
          extra-build-args: --build-arg S3_STATIC_BUCKET_NAME=blablabla --build-arg AMPLITUDE_API_KEY=${AMPLITUDE_STAGING_KEY} --build-arg HOTJAR_ID=${HOTJAR_STAGING_ID} --build-arg HOTJAR_SV=${HOTJAR_STAGING_SV}

Output :

+ docker buildx build -f backend/Dockerfile-prod -t ************.dkr.ecr.*********.amazonaws.com/advenir-common-docker-registry:staging-bbb11ded8049e2206bae08e493ce536bb6ce8984 -t ************.dkr.ecr.*********.amazonaws.com/advenir-common-docker-registry:staging-la**** --platform linux/amd64 --progress plain --push '--build-arg S3_STATIC_BUCKET_NAME=advenir-staging-static --build-arg AMPLITUDE_API_KEY=******************************** --build-arg HOTJAR_ID=******* --build-arg HOTJAR_SV=6' .
unknown flag: --build-arg S3_STATIC_BUCKET_NAME
See 'docker buildx build --help'.

Exited with code exit status 125

It worked fine on 8.1.3

fjcapdevila commented 1 year ago

Same problem here.

garshythoel commented 1 year ago

Same issue on our end

brivu commented 1 year ago

Hey Everyone,

I'm taking a look now, thank you!

Brian

brivu commented 1 year ago

Hey Everyone,

I have a fix in place with PR #254. Once I get this merged, I'll cut a new patch release.

Thanks again bringing up this issue so quickly with the all the relevant information for us to test!

Best, Brian

morloderex commented 1 year ago

@brivu https://github.com/CircleCI-Public/aws-ecr-orb/pull/254#issuecomment-1352242260