https://pantsbuild.org/ logo
#general
Title
# general
r

ripe-cpu-85141

08/23/2022, 8:45 PM
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

wide-midnight-78598

08/23/2022, 8:48 PM
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

ripe-cpu-85141

08/23/2022, 8:50 PM
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

wide-midnight-78598

08/23/2022, 8:51 PM
It's still in progress I believe, I actually haven't kept up with its current progress actually.
r

ripe-cpu-85141

08/23/2022, 8:52 PM
Meanwhile, I was wondering if something like
./pants --changed-since=origin/main --changed-dependees=transitive list | grep a_correct_filter
would work.
p

polite-garden-50641

08/23/2022, 9:07 PM
there is also some discussion here that might be useful https://github.com/pantsbuild/pants/issues/14243
r

ripe-cpu-85141

08/23/2022, 9:23 PM
Interesting. thanks!
5 Views