Replies: 1 comment
-
Hi!
Yes, but you still need to handle the docker login outside of pants, and propagate any required env vars that docker or the docker auth plugin requires to work, as by default Pants strips away all your env vars before invoking sub processes. There are more details of this in our Slack channel if your search for docker auth there.
Yes. Any packages being published will first be packaged.
Yes, that's one way to get the env var into the Pants world. Then there are a few different ways to pick it up for your
Yes, see https://www.pantsbuild.org/docs/advanced-target-selection and for reference: https://www.pantsbuild.org/docs/reference-filter |
Beta Was this translation helpful? Give feedback.
-
Hi, I've been reading about docker and CI using Pants. Locally, it works great and really simplifies the
dockerfile
.However, right now I want to put the build and push docker image process in the CI. Currently, my team uses the template from build-push-actions from docker. My questions are:
build and push action
step from here and change it withpants publish ::
?pants publish
builds image and push it to the registries. This mean, I can skippants package
, am I correct?build_args
, one as the image's tag. I assume that the latter can be put intobuild_args
as well. However, can I do something like this:IMAGE_TAG=${{steps.gen_tag.outputs.tag}} SOME_SECRET=${{steps.auth.outputs.token}} pants publish ::
pants publish
?I'm sorry for many questions but I've been stuck on this part of developing with Pants. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions