bitter-ability-32190
06/23/2023, 2:55 PM{pants.hash}
interpolated value work in extra_build_args
? The code and docs suggest so, but dumping the sandbox I see
--build-arg $'INPUT_HASH={pants.hash}'
bitter-ability-32190
06/23/2023, 2:55 PMextra_build_args=["INPUT_HASH={pants.hash}"],
bitter-ability-32190
06/23/2023, 2:57 PM[docker]
build_args = ["PANTS_HASH={pants.hash}"]
curved-television-6568
06/23/2023, 3:41 PMextra_build_args
.. as the docs, although subtle I grant you that, does not say it is supported. Note the difference for these two field docs:
extra_build_args
type:Iterable[str] | None
default:()
Build arguments () to use when building this image. Entries are either strings in the form--build-arg
to set an explicit value; or justARG_NAME=value
to copy the value from Pants’s own environment.ARG_NAME
Useto set default build args for all images.[docker].build_args
image_tags
type:Iterable[str] | None
default:('latest',)
Any tags to apply to the Docker image name (the version is usually applied as a tag).
tag may use placeholders in curly braces to be interpolated. The placeholders are derived from various sources, such as the Dockerfile instructions and build args.
See Tagging Docker images.(only one of them mentions placeholders…)
curved-television-6568
06/23/2023, 3:43 PMcurved-television-6568
06/23/2023, 3:43 PMbitter-ability-32190
06/23/2023, 3:43 PMAs we've seen above, some fields of theSpecifically "build arg" Followed by:support replacing placeholder values in curly braces with variable text, such as a build arg or base image tag for instance.docker_image
These are the common values available for all fields:
curved-television-6568
06/23/2023, 3:44 PMbitter-ability-32190
06/23/2023, 3:44 PMcurved-television-6568
06/23/2023, 3:45 PMcurved-television-6568
06/23/2023, 3:46 PM> These are the common values available for all fields:
ought to read
These are the common values available for all fields that support placeholders:
bitter-ability-32190
06/23/2023, 3:46 PMcurved-television-6568
06/23/2023, 3:48 PM