本文整理了Java中hudson.model.AbstractProject.getQuietPeriod()
方法的一些代码示例,展示了AbstractProject.getQuietPeriod()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractProject.getQuietPeriod()
方法的具体详情如下:
包路径:hudson.model.AbstractProject
类名称:AbstractProject
方法名:getQuietPeriod
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* Schedule a new build for this project.
* @see #schedule(Task, int)
*/
public @CheckForNull WaitingItem schedule(AbstractProject p) {
return schedule(p, p.getQuietPeriod());
}
代码示例来源:origin: jenkinsci/jenkins
@Override public int getQuietPeriod() {
return delegate.asProject().getQuietPeriod();
}
@Override public QueueTaskFuture<?> scheduleBuild2(int quietPeriod, Action... actions) {
代码示例来源:origin: jenkinsci/jenkins
/**
* Computes the delay by taking the default value and the override in the request parameter into the account.
*
* @deprecated as of 1.489
* Inject {@link TimeDuration}.
*/
@Deprecated
public int getDelay(StaplerRequest req) throws ServletException {
String delay = req.getParameter("delay");
if (delay==null) return getQuietPeriod();
try {
// TODO: more unit handling
if(delay.endsWith("sec")) delay=delay.substring(0,delay.length()-3);
if(delay.endsWith("secs")) delay=delay.substring(0,delay.length()-4);
return Integer.parseInt(delay);
} catch (NumberFormatException e) {
throw new ServletException("Invalid delay parameter value: "+delay);
}
}
代码示例来源:origin: jenkinsci/jenkins
continue;
boolean scheduled = p.scheduleBuild(p.getQuietPeriod(), new UpstreamCause((Run)build), buildActions.toArray(new Action[buildActions.size()]));
if (Jenkins.getInstance().getItemByFullName(p.getFullName()) == p) {
String name = ModelHyperlinkNote.encodeTo(p);
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Schedule a new build for this project.
* @see #schedule(Task, int)
*/
public @CheckForNull WaitingItem schedule(AbstractProject p) {
return schedule(p, p.getQuietPeriod());
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Schedules a build of this project.
*
* @return true if the project is actually added to the queue. false if the
* queue contained it and therefore the add() was noop
*/
public boolean scheduleBuild(Cause c) {
return scheduleBuild(getQuietPeriod(), c);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Schedule a new build for this project.
*
* @return true if the project is actually added to the queue.
* false if the queue contained it and therefore the add()
* was noop
*/
public WaitingItem schedule(AbstractProject p) {
return schedule(p, p.getQuietPeriod());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Schedule a new build for this project.
*
* @return true if the project is actually added to the queue.
* false if the queue contained it and therefore the add()
* was noop
*/
public WaitingItem schedule(AbstractProject p) {
return schedule(p, p.getQuietPeriod());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Schedules a build of this project.
*
* @return
* true if the project is actually added to the queue.
* false if the queue contained it and therefore the add()
* was noop
*/
public boolean scheduleBuild(Cause c) {
return scheduleBuild(getQuietPeriod(), c);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Schedule a new build for this project.
*
* @return true if the project is actually added to the queue. false if the
* queue contained it and therefore the add() was noop
*/
public WaitingItem schedule(AbstractProject p) {
return schedule(p, p.getQuietPeriod());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Schedules a build of this project.
*
* @return true if the project is actually added to the queue. false if the
* queue contained it and therefore the add() was noop
*/
public boolean scheduleBuild(Cause c) {
return scheduleBuild(getQuietPeriod(), c);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override public int getQuietPeriod() {
return delegate.asProject().getQuietPeriod();
}
@Override public QueueTaskFuture<?> scheduleBuild2(int quietPeriod, Action... actions) {
代码示例来源:origin: hudson/hudson-2.x
/**
* Schedules a build of this project.
*
* @return
* true if the project is actually added to the queue.
* false if the queue contained it and therefore the add()
* was noop
*/
public boolean scheduleBuild(Cause c) {
return scheduleBuild(getQuietPeriod(), c);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Schedule a new build for this project.
*
* @return true if the project is actually added to the queue.
* false if the queue contained it and therefore the add()
* was noop
*/
public WaitingItem schedule(AbstractProject p) {
return schedule(p, p.getQuietPeriod());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Computes the delay by taking the default value and the override in the request parameter into the account.
*/
public int getDelay(StaplerRequest req) throws ServletException {
String delay = req.getParameter("delay");
if (delay==null) return getQuietPeriod();
try {
// TODO: more unit handling
if(delay.endsWith("sec")) delay=delay.substring(0,delay.length()-3);
if(delay.endsWith("secs")) delay=delay.substring(0,delay.length()-4);
return Integer.parseInt(delay);
} catch (NumberFormatException e) {
throw new ServletException("Invalid delay parameter value: "+delay);
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Computes the delay by taking the default value and the override in the request parameter into the account.
*/
public int getDelay(StaplerRequest req) throws ServletException {
String delay = req.getParameter("delay");
if (delay==null) return getQuietPeriod();
try {
// TODO: more unit handling
if(delay.endsWith("sec")) delay=delay.substring(0,delay.length()-3);
if(delay.endsWith("secs")) delay=delay.substring(0,delay.length()-4);
return Integer.parseInt(delay);
} catch (NumberFormatException e) {
throw new ServletException("Invalid delay parameter value: "+delay);
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Computes the delay by taking the default value and the override in the request parameter into the account.
*
* @deprecated as of 1.489
* Inject {@link TimeDuration}.
*/
@Deprecated
public int getDelay(StaplerRequest req) throws ServletException {
String delay = req.getParameter("delay");
if (delay==null) return getQuietPeriod();
try {
// TODO: more unit handling
if(delay.endsWith("sec")) delay=delay.substring(0,delay.length()-3);
if(delay.endsWith("secs")) delay=delay.substring(0,delay.length()-4);
return Integer.parseInt(delay);
} catch (NumberFormatException e) {
throw new ServletException("Invalid delay parameter value: "+delay);
}
}
代码示例来源:origin: org.hudsonci.plugins/parameterized-trigger
protected Future schedule(AbstractBuild<?, ?> build, AbstractProject project, List<Action> list) throws InterruptedException, IOException {
return project.scheduleBuild2(project.getQuietPeriod(),
new UpstreamCause((Run) build),
list.toArray(new Action[list.size()]));
}
代码示例来源:origin: jenkinsci/promoted-builds-plugin
public void consider(Promotion p) {
if (appliesTo(p.getParent()) && job != null) {
job.scheduleBuild2(job.getQuietPeriod());
}
}
代码示例来源:origin: org.hudsonci.plugins/downstream-ext
public void run() {
LOGGER.info("Polling for SCM changes in " + this.project.getName());
PollingResult pollingResult = this.project.poll(this.taskListener);
if(pollingResult.hasChanges()) {
LOGGER.info("SCM changes found for " + this.project.getName() + ". Triggering build.");
if (this.project.scheduleBuild(this.project.getQuietPeriod(), this.cause,
buildActions.toArray(new Action[buildActions.size()]))) {
LOGGER.info("Build of " + this.project.getName() + " scheduled successfully.");
} else {
LOGGER.info("No build of " + this.project.getName() + " scheduled - this usually means that another build is already in the queue.");
}
} else {
LOGGER.info(Messages.DownstreamTrigger_NoSCMChanges(this.project.getName()));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!