plain-river-51682
09/17/2020, 8:42 AMlist, dependees, minimize, filter
). Is there a way to write a pants plugin that invokes these goals?happy-kitchen-89482
09/17/2020, 4:25 PMplain-river-51682
09/18/2020, 7:49 AMlocal changed
changed=($(./pants ${changed_parent} list))
if [[ -z $changed ]]; then
return 0
fi
local dependees
dependees=($(./pants dependees --dependees-transitive --dependees-closed "${changed[@]}"))
local minimized
minimized=($(./pants minimize "${dependees[@]}"))
local changed_targets
changed_targets=($(./pants filter ${filter} "${minimized[@]}"))
echo "Got changed targets ${changed_targets[@]}" "${TARGETS[@]}"
TARGETS=("${changed_targets[@]}" "${TARGETS[@]}")
But bash syntax is clunky and we would like to add some more logic that would be easier to write in python.
We would rather do ./pants run-ci-pipeline --step test
that would run the needed steps to calculate the targets and run tests against themhappy-kitchen-89482
09/18/2020, 8:01 PMplain-river-51682
09/19/2020, 9:18 AMhappy-kitchen-89482
09/21/2020, 10:23 PMlist, dependees, minimize, filter
functionality you're currently using separately) here: https://github.com/pantsbuild/pants/tree/1.29.x/src/python/pants/backend/project_info, https://github.com/pantsbuild/pants/tree/1.29.x/src/python/pants/backend/graph_info/tasks