breezy-apple-27122
10/05/2023, 1:34 PMpants publish
or pants package
? I have the following config in `pants.toml`:
[docker.registries.myregistry]
address = "<http://myregistry.azurecr.io|myregistry.azurecr.io>"
default = true
[docker.registries.mysecondregistry]
address = "<http://mysecondregistry.azurecr.io|mysecondregistry.azurecr.io>"
Depending on the environment, I want to push to mysecondregistry
instead of myregistry
. I was thinking about having something like pants --registry mysecondregistry publish ::
. Then I can alternate between them in CI. Both registries will be used in CI, so using a specific one in pants.ci.toml is not the case.curved-television-6568
10/05/2023, 1:45 PM.pants.rc
files or on the command line/env as there’s currently no flag that toggle registries by alias.curved-television-6568
10/05/2023, 1:45 PMbreezy-apple-27122
10/05/2023, 1:46 PMpants.rc
? Will it override pants.ci.toml
?curved-television-6568
10/05/2023, 1:46 PMcurved-television-6568
10/05/2023, 1:47 PM[docker.registries.myregistry.add]
default = false
[docker.registries.mysecondregistry.add]
default = true
curved-television-6568
10/05/2023, 1:50 PMskip_push
option for registries you could usebreezy-apple-27122
10/05/2023, 1:50 PMpants --pants-config-files="['<buildroot>/pants.ci.alternative.toml']" publish ::
solve?curved-television-6568
10/05/2023, 1:50 PMskip_push=False
for the ones you want to push to, for instance.curved-television-6568
10/05/2023, 1:51 PMcurved-television-6568
10/05/2023, 1:51 PMgorgeous-winter-99296
10/05/2023, 2:42 PMparametrize
on the docker_image.registries
field? I'd also consider macros+tags if that doesn't work.