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

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

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

Jenkins.rebuildDependencyGraph介绍

[英]Rebuilds the dependency map.
[中]重建依赖关系映射。

代码示例

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

  1. public void run(Reactor session) throws Exception {
  2. rebuildDependencyGraph();

代码示例来源:origin: i-m-c/jenkins-inheritance-plugin

  1. public void onLoaded() {
  2. //This happens shortly before Jenkins has completely loaded; run a
  3. //last PCE, to absolutely ensure that all jobs are present
  4. pce().notifyJenkinsStartupComplete();
  5. //And rebuild the job graph
  6. Jenkins.getInstance().rebuildDependencyGraph();
  7. }

代码示例来源:origin: hudson.plugins/project-inheritance

  1. /**
  2. * This method does the same as {@link #onJenkinsStart()}, except that
  3. * it has no reason to wait, since all static Jobs are guaranteed to
  4. * have been created by then. Unfortunately, Jenkins has most likely
  5. * already called {@link Queue#init(Jenkins)} by this point, so the
  6. * other function is also important.
  7. * <p>
  8. * In other words, this functions ensures the reliable creation of all
  9. * transient jobs; whereas the other one tries to promise a reliable
  10. * restoration of jobs that were stuck in the previous Queue.
  11. */
  12. @Initializer(after=JOB_LOADED,fatal=false)
  13. public static void onJenkinsJobsGuaranteedLoaded() {
  14. //Triggering the automatic loading of transients
  15. if (ProjectCreationEngine.instance != null) {
  16. ProjectCreationEngine.instance.notifyJenkinsStartupComplete();
  17. } else {
  18. //This should never happen
  19. log.severe(
  20. "Issue during loading of transient jobs; PCE not yet initialized!"
  21. );
  22. }
  23. //Now, that all jobs are present; we rebuild the Jenkins job
  24. //dependency graph
  25. Jenkins.getInstance().rebuildDependencyGraph();
  26. }
  27. }

代码示例来源:origin: i-m-c/jenkins-inheritance-plugin

  1. /**
  2. * This method does the same as {@link #onJenkinsStart()}, except that
  3. * it has no reason to wait, since all static Jobs are guaranteed to
  4. * have been created by then. Unfortunately, Jenkins has most likely
  5. * already called {@link Queue#init(Jenkins)} by this point, so the
  6. * other function is also important.
  7. * <p>
  8. * In other words, this functions ensures the reliable creation of all
  9. * transient jobs; whereas the other one tries to promise a reliable
  10. * restoration of jobs that were stuck in the previous Queue.
  11. */
  12. @Initializer(after=JOB_LOADED,fatal=false)
  13. public static void onJenkinsJobsGuaranteedLoaded() {
  14. //Triggering the automatic loading of transients
  15. if (ProjectCreationEngine.instance != null) {
  16. ProjectCreationEngine.instance.notifyJenkinsStartupComplete();
  17. } else {
  18. //This should never happen
  19. log.severe(
  20. "Issue during loading of transient jobs; PCE not yet initialized!"
  21. );
  22. }
  23. //Now, that all jobs are present; we rebuild the Jenkins job graph
  24. Jenkins.getInstance().rebuildDependencyGraph();
  25. }

代码示例来源:origin: jenkinsci/junit-plugin

  1. private void createDownstreamProjectWithTests() throws Exception {
  2. createDownstreamProjectWithNoTests();
  3. addJUnitResultArchiver(downstreamProject);
  4. j.jenkins.rebuildDependencyGraph();
  5. }

代码示例来源:origin: jenkinsci/maven-plugin

  1. Jenkins.getInstance().rebuildDependencyGraph();

代码示例来源:origin: JoelJ/ez-templates

  1. Jenkins.getInstance().rebuildDependencyGraph();

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

  1. public void run(Reactor session) throws Exception {
  2. rebuildDependencyGraph();

代码示例来源:origin: jenkinsci/junit-plugin

  1. private void createDownstreamProjectWithNoTests() throws Exception {
  2. downstreamProject = j.createFreeStyleProject(TEST_PROJECT_NAME);
  3. downstreamProject.setQuietPeriod(0);
  4. addFingerprinterToProject(downstreamProject, singleContents, singleFiles);
  5. upstreamProject.getPublishersList().add(new BuildTrigger(ImmutableList.of(downstreamProject), Result.SUCCESS));
  6. upstreamProject.getPublishersList().add(new AggregatedTestResultPublisher(null));
  7. j.jenkins.rebuildDependencyGraph();
  8. }

相关文章

Jenkins类方法