Skip to content
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

Option to permit disable Strict Forbidden files #252

Merged
merged 1 commit into from Oct 2, 2015

Conversation

Projects
None yet
3 participants
@scoheb
Copy link
Contributor

commented Oct 1, 2015

Add option to gerrit project to permit the disable of the default strict forbidden file verification of an event.

Enabling this option will allow an event to trigger a build if the event contains BOTH one or more wanted file paths AND one or more forbidden file paths.

In other words, with this option, the build will not get triggered if the change contains only forbidden files, otherwise it will get triggered.

[FIXED JENKINS-30620]

Change-Id: Icb84111c82a38db722ec09bf7538441bc1b9424a

@jenkinsadmin

This comment has been minimized.

Copy link
Member

commented Oct 1, 2015

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

// wanted topics or file paths even though there may be a forbidden file
return foundInterestingTopicOrFile;
} else {
if (foundInterestingForbidden && foundInterestingTopicOrFile) {

This comment has been minimized.

Copy link
@rsandell

rsandell Oct 1, 2015

Member

IIUC

if (foundInterestingForbidden) {
    // we have a forbidden file and a wanted file path.
    return false;
} else if (foundInterestingTopicOrFile) {
    // we DO not have a forbidden file and but we have a wanted file path.
    return true;
}

would have the same logic but perhaps easier to read?

This comment has been minimized.

Copy link
@scoheb

scoheb Oct 1, 2015

Author Contributor

Yep. You are right. Too many hours in front of a screen :) Tx

@scoheb scoheb force-pushed the scoheb:disable-strict-ff branch from 80e6fed to 8ffb44d Oct 1, 2015

Scott Hebert
Option to permit disable Strict Forbidden files
Add option to gerrit project to permit the disable of the default
strict forbidden file verification of an event

Enabling this option will allow an event to trigger a build if the event contains BOTH one or more wanted file paths/topics/branches AND one or more forbidden file paths.

In other words, with this option, the build will not get triggered if the change contains only forbidden files, otherwise it will get triggered.

[FIXED JENKINS-30620]

Change-Id: Icb84111c82a38db722ec09bf7538441bc1b9424a

@scoheb scoheb force-pushed the scoheb:disable-strict-ff branch from 8ffb44d to 897bb7b Oct 1, 2015

@@ -78,7 +80,8 @@ public GerritProject(
List<Branch> branches,
List<Topic> topics,
List<FilePath> filePaths,
List<FilePath> forbiddenFilePaths) {
List<FilePath> forbiddenFilePaths,
boolean disableStrictForbiddenFileVerification) {

This comment has been minimized.

Copy link
@rsandell

rsandell Oct 2, 2015

Member

Note to future selves; we should stop putting things into the constructor and start using @DataboundSetters instead.

rsandell added a commit that referenced this pull request Oct 2, 2015

Merge pull request #252 from scoheb/disable-strict-ff
Option to permit disable Strict Forbidden files

@rsandell rsandell merged commit c7b5640 into jenkinsci:master Oct 2, 2015

1 check passed

Jenkins This pull request looks good
Details
@rsandell

This comment has been minimized.

Copy link
Member

commented Oct 2, 2015

Are you in a hurry to get this released or can I wait for something else to drop in?
Version numbers are cheap, so I have no problems with releasing this anyway, but three new versions in September is quite an awesome set of releases ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.