Skip to content
Browse files
[JENKINS-42194] Code review reveals valid point, no schedules is not …
…a warning

(cherry picked from commit 5f5f880)
  • Loading branch information
stephenc authored and olivergondza committed Apr 13, 2017
1 parent da67b37 commit 7f42b5bbd31376fa52c1b3aeab15a3c3d3f9f238
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
@@ -358,6 +358,24 @@ public FormValidation doCheckPollingThreadCount(@QueryParameter String value) {
return FormValidation.ok();
return FormValidation.validateNonNegativeInteger(value);

* Performs syntax check.
public FormValidation doCheckScmpoll_spec(@QueryParameter String value,
@QueryParameter boolean ignorePostCommitHooks,
@AncestorInPath Item item) {
if (StringUtils.isBlank(value)) {
if (ignorePostCommitHooks) {
return FormValidation.ok(Messages.SCMTrigger_no_schedules_no_hooks());
} else {
return FormValidation.ok(Messages.SCMTrigger_no_schedules_hooks());
} else {
return Jenkins.getInstance().getDescriptorByType(TimerTrigger.DescriptorImpl.class)
.doCheckSpec(value, item);

@@ -23,6 +23,8 @@
SCMTrigger.DisplayName=Poll SCM
SCMTrigger.getDisplayName={0} Polling Log
SCMTrigger.BuildAction.DisplayName=Polling Log
SCMTrigger.no_schedules_no_hooks=Post commit hooks are being ignored and no schedules so will never run due to SCM changes
SCMTrigger.no_schedules_hooks=No schedules so will only run due to SCM changes if triggered by a post-commit hook
SCMTrigger.SCMTriggerCause.ShortDescription=Started by an SCM change
TimerTrigger.DisplayName=Build periodically
TimerTrigger.MissingWhitespace=You appear to be missing whitespace between * and *.

0 comments on commit 7f42b5b

Please sign in to comment.