jenkins.model.Jenkins.setQuietPeriod()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(196)

本文整理了Java中jenkins.model.Jenkins.setQuietPeriod()方法的一些代码示例,展示了Jenkins.setQuietPeriod()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.setQuietPeriod()方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:setQuietPeriod

Jenkins.setQuietPeriod介绍

[英]Sets the global quiet period.
[中]设置全局静默期。

代码示例

代码示例来源:origin: jenkinsci/jenkins

@Override
  public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
    int i=0;
    try {
      i = Integer.parseInt(json.getString("quietPeriod"));
    } catch (NumberFormatException e) {
      // fall through
    }
    try {
      // for compatibility reasons, this value is stored in Jenkins
      Jenkins.get().setQuietPeriod(i);
      return true;
    } catch (IOException e) {
      throw new FormException(e,"quietPeriod");
    }
  }
}

代码示例来源:origin: jenkinsci/jenkinsfile-runner

public void setQuietPeriod(int qp) throws IOException {
  jenkins.setQuietPeriod(qp);
}

代码示例来源:origin: io.jenkins.jenkinsfile-runner/setup

public void setQuietPeriod(int qp) throws IOException {
  jenkins.setQuietPeriod(qp);
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

@Override
  public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
    int i=0;
    try {
      i = Integer.parseInt(json.getString("quietPeriod"));
    } catch (NumberFormatException e) {
      // fall through
    }
    try {
      // for compatibility reasons, this value is stored in Jenkins
      Jenkins.getInstance().setQuietPeriod(i);
      return true;
    } catch (IOException e) {
      throw new FormException(e,"quietPeriod");
    }
  }
}

相关文章

Jenkins类方法