curved-farmer-66180
01/12/2023, 3:26 AM{build_args.REGISTRY}/$stg/$ecr_repository:$IMAGE_TAG +1 additional tag.
Error: 5.45 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building docker image {build_args.REGISTRY}/$stg/$ecr_repository:$IMAGE_TAG +1 additional tag.' failed with exit code 125.
stdout:
stderr:
invalid argument "{build_args.REGISTRY}/$stg/$ecr_repository:$IMAGE_TAG" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
github action ci file
run: |
./pants publish \
--docker-build-args='[ \
"DD_SERVICE=payhere-hero-cx", \
"DD_ENV=stg", \
"DD_VERSION=$IMAGE_TAG", \
"IMAGE_TAG=$IMAGE_TAG", \
"REGISTRY=$ECR_REGISTRY", \
"REPOSITORY=$STG/$ECR_REPOSITORY", \
]' payhere/app_services/hero_cx:payhere_hero_cx
I got the error with invalid argument. I am using docker plugin. Is anybody able to help?docker_image(
name="payhere_hero_cx",
source="Dockerfile.hero_cx",
repository="{build_args.REPOSITORY}",
registries=["{build_args.REGISTRY}"],
image_tags=["{build_args.IMAGE_TAG}", "latest"]
)
happy-kitchen-89482
01/12/2023, 3:30 AMcurved-television-6568
01/12/2023, 4:40 AMregistries
doesn’t support placeholders: https://www.pantsbuild.org/docs/reference-docker_image#coderegistriescode
Every field that does has a paragraph that begins with: <fieldname> may use placeholders in curly braces …
env()
support for BUILD
files in general: https://github.com/pantsbuild/pants/pull/17652curved-farmer-66180
01/13/2023, 9:24 AMdocker_image(
name="payhere_hero_cx",
source="Dockerfile.hero_cx",
repository="{build_args.REPOSITORY}",
registries=[env("ECR_REPOSITORY_WITH_STAGE")],
image_tags=["{build_args.IMAGE_TAG}", "latest"]
)
@curved-television-6568 It is not ready for pant 2.14 right?curved-television-6568
01/13/2023, 2:13 PM