Hello. I have a monorepo with several projects and...
# general
r
Hello. I have a monorepo with several projects and a single pipeline. I deploy stuff in the cloud. Right now, I use bash/python scripts to call pants and do the build and deployment. Each pipeline run deploys all projects all the time. I'd like to avoid that and instead deploy only the changed parts. I was wondering if I could use something like what the CI page describes for the lint/check/test goals. But I'm not sure what goal to use. The best would be something that tells me that my package targets need to be rebuilt because things have changed like for the
test
goal (which is different from building the packages because they don't exist on
dist/
). I was also wondering about the
publish
goal. That seems to be more to push artifacts on repositories like artifactory. Would it be a good practice to use
publish
to also deploy stuff on the cloud using CloudFormation or Terraform or Pants is not the right tool for that?
w
There is discussion about this: https://github.com/pantsbuild/pants/issues/16515 A
deploy
goal which might be closer to what you're looking for. I think right now, it's used by Helm maybe? I was looking into it for
ansible
deployment personally
r
I don't see
deploy
in the doc but that would be a better match than
publish
most likely. In my situation, it's to trigger CloudFormation or Terraform templates
w
It's still in progress I believe, I actually haven't kept up with its current progress actually.
r
Meanwhile, I was wondering if something like
./pants --changed-since=origin/main --changed-dependees=transitive list | grep a_correct_filter
would work.
p
there is also some discussion here that might be useful https://github.com/pantsbuild/pants/issues/14243
r
Interesting. thanks!