This adds a new advanced `--restrict-push-urls` option that can be used
to restrict the set of valid remote scm urls that can be published to.
Pants immediately dogfoods this to restrict jar publishing from master
Test coverage is added for the ScmPublishMixin clean master check.
pants.ini | 4 +++
src/python/pants/backend/core/tasks/scm_publish.py | 42 ++++++++++++++++++++----
src/python/pants/scm/scm.py | 3 +-
tests/python/pants_test/backend/core/tasks/BUILD | 19 +++++++++++
tests/python/pants_test/backend/core/tasks/__init__.py | 0
tests/python/pants_test/backend/core/tasks/test_scm_publish.py | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 147 insertions(+), 9 deletions(-)
CI went green here:
I think there is something that I'm not understanding here. Setting commit to False essentialy skips the branch and remote ...
I think there is something that I'm not understanding here. Setting commit to False essentialy skips the branch and remote checks. So doesn't this test, and the next two, basically all test the same thing?