-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude src/test/ from shared libraries by default #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we can add a message to a build log when there's a test package that we're excluding? I.e. make this change discoverable? |
@daniel-beck We could do something like this:
Which would result in a message like this for users in their build logs:
What do you think? |
@dwnusbaum It's unclear what issue would be fixed by moving files. How about this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
#83 brought to my attention that some users are putting test code for their shared libraries in
src/test
, mostly when using https://github.com/jenkinsci/JenkinsPipelineUnit, which is not a good idea, since it means that the test code is available to Pipelines using the library. To help users who might have made this mistake accidentally (e.g.pipeline-library
before jenkins-infra/pipeline-library#138), this PR makes it so thatsrc/test
is specifically excluded when a shared library is checked out.In case users were actually using a a package named
test
in their shared library, there is a system property that can be set as an escape hatch to restore the previous behavior.