hudson.triggers.Trigger.stop()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(236)

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

Trigger.stop介绍

[英]Called before a Trigger is removed. Under some circumstances, this may be invoked more than once for a given Trigger, so be prepared for that.

When the configuration is changed for a project, all triggers are removed once and then added back.
[中]在移除触发器之前调用。在某些情况下,对于给定的触发器,这可能会被多次调用,所以要做好准备。
当项目的配置被更改时,所有触发器都会被删除一次,然后重新添加。

代码示例

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

@Override public void stop() {
  super.stop();
  RunListenerImpl.get().invalidateCache();
}

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

t.stop();
triggers.replaceBy(buildDescribable(req, Trigger.for_(this)));
for (Trigger t : triggers())

代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-job

public void stopTriggers() {
  for (Trigger trigger : triggers) {
    trigger.stop();
  }
}

代码示例来源:origin: nishio-dens/bitbucket-pullrequest-builder-plugin

@Override
public void stop() {
  super.stop();
}

代码示例来源:origin: nemccarthy/stash-pullrequest-builder-plugin

@Override
public void stop() {
  super.stop();
}

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

public void superStop() {
  super.stop();
}

代码示例来源:origin: timols/jenkins-gitlab-merge-request-builder-plugin

@Override
public void stop() {
  if (job == null) {
    return;
  }
  if (builder != null) {
    builder.stop();
    builder = null;
  }
  super.stop();
}

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

@Override
public void stop() {
  if (job != null) {
    logger.info("Stopping " + job.getName() + " Artifactory trigger.");
  }
  super.stop();
}

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

@Override public void stop() {
  super.stop();
  RunListenerImpl.get().invalidateCache();
}

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

@Override
public void stop() {
  logger.debug("Stop");
  GerritProjectList.removeTriggerFromProjectList(this);
  super.stop();
  try {
    removeListener();
  } catch (IllegalStateException e) {
    logger.error("I am too late!", e);
  }
  cancelTimer();
}

代码示例来源:origin: KostyaSha/github-integration-plugin

@Override
public void stop() {
  repoName = null;
  getRepoProviders().forEach(GitHubRepoProvider::onTriggerStop);
  //TODO clean hooks?
  if (nonNull(job)) {
    LOG.info("Stopping '{}' for project '{}'", getDescriptor().getDisplayName(), job.getFullName());
  }
  super.stop();
}

代码示例来源:origin: io.fabric8.jenkins.plugins/openshift-sync

@Override
public void stop() {
 String name = super.job != null ? super.job.getFullName() : "NOT STARTED";
 logger.log(Level.INFO, "Stopping the OpenShift Build trigger for project {0}", name);
 if (super.job != null) {
  this.buildConfigProjectProperty = super.job.getProperty(BuildConfigProjectProperty.class);
  if (this.buildConfigProjectProperty != null) {
   String buildConfigUid = this.buildConfigProjectProperty.getUid();
   if (!StringUtils.isEmpty(buildConfigUid)) {
    DESCRIPTOR.removeBuildConfigTrigger(buildConfigUid, super.job);
   }
  }
 }
 super.stop();
}

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

@Override
public void stop() {
  initPython();
  if (pexec.isImplemented(2)) {
    pexec.execPythonVoid("stop");
  } else {
    super.stop();
  }
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
   * {@inheritDoc}
   */
  @Override
  protected void onCascadingProjectRemoved() {
    if (isOverridden() && null != getValue()) {
      getValue().stop();
      resetValue();
    }
  }
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
   * {@inheritDoc}
   */
  @Override
  protected void onCascadingProjectRemoved() {
    if (isOverridden() && null != getValue()) {
      getValue().stop();
      resetValue();
    }
  }
}

代码示例来源:origin: hudson/hudson-2.x

/**
   * {@inheritDoc}
   */
  @Override
  protected void onCascadingProjectRemoved() {
    if (isOverridden() && null != getValue()) {
      getValue().stop();
      resetValue();
    }
  }
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
   * {@inheritDoc}
   */
  @Override
  protected void onCascadingProjectRemoved() {
    if (isOverridden() && null != getValue()) {
      getValue().stop();
      resetValue();
    }
  }
}

代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder

public void addTrigger(Trigger trigger) {
  Trigger old = triggers.get(trigger.getDescriptor());
  if (old != null) {
    old.stop();
    triggers.remove(old);
  }
  triggers.add(trigger);
  trigger.start(this, true);
}

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

public void addTrigger(Trigger trigger) {
  Trigger old = triggers.get(trigger.getDescriptor());
  if (old != null) {
    old.stop();
    triggers.remove(old);
  }
  triggers.add(trigger);
  trigger.start(this, true);
}

代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-job

public void addTrigger(Trigger trigger) throws IOException {
  BulkChange bc = new BulkChange(this);
  try {
    PipelineTriggersJobProperty originalProp = getTriggersJobProperty();
    Trigger old = originalProp.getTriggerForDescriptor(trigger.getDescriptor());
    if (old != null) {
      originalProp.removeTrigger(old);
      old.stop();
    }
    originalProp.addTrigger(trigger);
    removeProperty(PipelineTriggersJobProperty.class);
    addProperty(originalProp);
    bc.commit();
  } finally {
    bc.abort();
  }
}

相关文章