stocky-address-28880
02/21/2024, 1:32 PMpants package within Github CI and --changed-since flag.
We are currently building our packages within the Github CI using pants package --changed-since=$GITHUB_SHA^1 --changed-dependents=transitive . We have about multiple projects with various images to build. So far pants works like a charm when building them. Sometimes all images are build again, e.g. when we do version upgrades or major changes is some projects.
To speed up this process we aim to parallalelize the package step within the CI pipeline. Essentially we would have a separate pipeline for each project, by using Githubs Matrix, sth like this.
package
strategy:
matrix:
project: ["p1", "p2", "p3"]
steps:
- name: Pants Package
pants package src/${{ matrix.project }}:: --changed-since=$GITHUB_SHA^1 --changed-dependents=transitive
Unfortunately specifying a directory does not work with the --changed-since=$GITHUB_SHA^1 command. So the above example will throw an error. Building the parallelization without --changed-since we lose another great tool to speed things up and we would indeed build everytime everything new.
Do you have any ideas on suggestions on this topic? Or is there already something I might be missing? I haven't found a solution to this challenge yet in either the documentation or this channel. Would really appreciate your help!broad-processor-92400
02/21/2024, 3:51 PM--filter-address-regex=^src/{{ matrix.project}}/ to the invocation . See also https://www.pantsbuild.org/2.19/docs/using-pants/advanced-target-selection#filter-optionsstocky-address-28880
02/22/2024, 12:55 PM