I now have a few useful flags that are also docker...
# plugins
a
I now have a few useful flags that are also docker build_args . if i wanted to avoid having to run: pants package --flag-1=X --docker-build-args='["flag-1=X"]' I would need a @rule that took in my flag (my subsystem, reall) and outputed... What? DockerBuildArgs.extended?
Copy code
@rule
def resolve_build_args(args: DockerBuildArgs, sub: MySubSystem) -> DockerBuildArgs:
  return args.extended(["flag-1=X"])
Nope, doesn't work.
h
alias / macro
a
??
f
I believe the suggestion was to configure a custom CLI alias in
pants.toml
as follows:
Copy code
[cli.alias]
"--flag-1" = "--docker-build-args=--flag-1=foo"
The CLI aliases can include "option" aliases. However, the option alias feature does not support taking a parameter currently.
(so my example config assumes "foo" as the parameter)
But support for passing a parameter through sounds like a good feature.
But if you already wrote the pluign, I can describe how you might extend the docker backend to allow injecting flags.
a
I needed the plugin anyway, this is an extension to deploy for gcloud .
Im off today so I'll have no movement on it. In general what I want is to trigger deployments (some arbitrary command like gcloud service update) after a docker publish. experimental-deploy seemed like a natural place for that and the only feedback I got from my team was a concern for the level of complexity/reinventing the wheel that it required.