hudson.model.Label.toString()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(160)

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

Label.toString介绍

暂无

代码示例

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

private static void fireOnStarted(final Cloud cloud, final Label label,
                   final Collection<NodeProvisioner.PlannedNode> plannedNodes) {
    for (CloudProvisioningListener cl : CloudProvisioningListener.all()) {
      try {
        cl.onStarted(cloud, label, plannedNodes);
      } catch (Error e) {
        throw e;
      } catch (Throwable e) {
        LOGGER.log(Level.SEVERE, "Unexpected uncaught exception encountered while "
            + "processing onStarted() listener call in " + cl + " for label "
            + label.toString(), e);
      }
    }
  }
}

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

/**
 * Returns a human readable text that explains this label.
 */
@Exported
public String getDescription() {
  Set<Node> nodes = getNodes();
  if(nodes.isEmpty()) {
    Set<Cloud> clouds = getClouds();
    if(clouds.isEmpty())
      return Messages.Label_InvalidLabel();
    return Messages.Label_ProvisionedFrom(toString(clouds));
  }
  if(nodes.size()==1)
    return nodes.iterator().next().getNodeDescription();
  return Messages.Label_GroupOf(toString(nodes));
}

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

private static String getCustomImage(Label label) {
 Matcher m = CUSTOM_IMAGE_FROM_LABEL_PATTERN.matcher(label.toString());
 if (m.find()) {
  return m.group(1);
 }
 return null;
}

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

private static Label getLabelWithoutCustomImage(Label label, String customDockerImage) {
 return Label.get(label.toString().replace(CUSTOM_IMAGE_SEPARATOR + customDockerImage, ""));
}

代码示例来源:origin: carlossg/jenkins-kubernetes-plugin

/**
 * @deprecated Use {@link Builder} instead.
 */
@Deprecated
public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, Label label)
    throws Descriptor.FormException, IOException {
  this(template, nodeDescription, cloud.name, label.toString(), new OnceRetentionStrategy(cloud.getRetentionTimeout())) ;
}

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

private static void fireOnStarted(final Cloud cloud, final Label label,
                   final Collection<NodeProvisioner.PlannedNode> plannedNodes) {
    for (CloudProvisioningListener cl : CloudProvisioningListener.all()) {
      try {
        cl.onStarted(cloud, label, plannedNodes);
      } catch (Error e) {
        throw e;
      } catch (Throwable e) {
        LOGGER.log(Level.SEVERE, "Unexpected uncaught exception encountered while "
            + "processing onStarted() listener call in " + cl + " for label "
            + label.toString(), e);
      }
    }
  }
}

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

public KubernetesSlave(String podName, PodRepository podRepository, KubernetesCloud kubernetesCloud, Label label)
  throws Descriptor.FormException,IOException {
  super(podName,
    DESCRIPTION,
    DEFAULT_REMOTE_FS,
    EXECUTORS,
    Mode.NORMAL,
    label == null ? null : label.toString(),
    new JNLPLauncher(),
    new SingleUseRetentionStrategy(IDLE_MINUTES),
    Collections.<NodeProperty<Node>>emptyList());
  this.kubernetesCloud = kubernetesCloud;
  this.podRepository = podRepository;
}

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

/**
 * Returns a human readable text that explains this label.
 */
@Exported
public String getDescription() {
  Set<Node> nodes = getNodes();
  if(nodes.isEmpty()) {
    Set<Cloud> clouds = getClouds();
    if(clouds.isEmpty())
      return Messages.Label_InvalidLabel();
    return Messages.Label_ProvisionedFrom(toString(clouds));
  }
  if(nodes.size()==1)
    return nodes.iterator().next().getNodeDescription();
  return Messages.Label_GroupOf(toString(nodes));
}

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

/**
 * Returns a human readable text that explains this label.
 */
@Exported
public String getDescription() {
  Set<Node> nodes = getNodes();
  if(nodes.isEmpty()) {
    Set<Cloud> clouds = getClouds();
    if(clouds.isEmpty())
      return Messages.Label_InvalidLabel();
    return Messages.Label_ProvisionedFrom(toString(clouds));
  }
  if(nodes.size()==1)
    return nodes.iterator().next().getNodeDescription();
  return Messages.Label_GroupOf(toString(nodes));
}

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

/**
 * Returns a human readable text that explains this label.
 */
@Exported
public String getDescription() {
  Set<Node> nodes = getNodes();
  if(nodes.isEmpty()) {
    Set<Cloud> clouds = getClouds();
    if(clouds.isEmpty())
      return Messages.Label_InvalidLabel();
    return Messages.Label_ProvisionedFrom(toString(clouds));
  }
  if(nodes.size()==1)
    return nodes.iterator().next().getNodeDescription();
  return Messages.Label_GroupOf(toString(nodes));
}

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

/**
 * Returns a human readable text that explains this label.
 */
@Exported
public String getDescription() {
  Set<Node> nodes = getNodes();
  if(nodes.isEmpty()) {
    Set<Cloud> clouds = getClouds();
    if(clouds.isEmpty())
      return Messages.Label_InvalidLabel();
    return Messages.Label_ProvisionedFrom(toString(clouds));
  }
  if(nodes.size()==1)
    return nodes.iterator().next().getNodeDescription();
  return Messages.Label_GroupOf(toString(nodes));
}

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

/**
 * Returns a human readable text that explains this label.
 */
@Exported
public String getDescription() {
  Set<Node> nodes = getNodes();
  if (nodes.isEmpty()) {
    Set<Cloud> clouds = getClouds();
    if (clouds.isEmpty()) {
      return Messages.Label_InvalidLabel();
    }
    return Messages.Label_ProvisionedFrom(toString(clouds));
  }
  if (nodes.size() == 1) {
    return nodes.iterator().next().getNodeDescription();
  }
  return Messages.Label_GroupOf(toString(nodes));
}

代码示例来源:origin: openshift/jenkins-cloud-plugin

protected void reloadConfig(Label label) throws IOException,
    InterruptedException, ReactorException {
  LOGGER.info("Reloading configuration for " + label.toString() + "...");
  String password = System.getenv("JENKINS_PASSWORD");
  String name = label.toString();

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

final String labelString = (label != null) ? label.toString() : "none";
final List<Server> runningNodes = getOpenstack().getRunningNodes();
final int globalMax = getEffectiveSlaveOptions().getInstanceCap();

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

if (label.toString().matches(pattern)) {
  LOGGER.fine("Node " + c.getNode().getDisplayName() + " is excluded from Selenium Grid because its label '" + label
      + "' matches exclusion pattern '" + pattern + "'");

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

LOGGER.info("Instance cap reached while adding capacity for label " + ((label != null) ? label.toString() : "null"));
break; // maxed out

代码示例来源:origin: openshift/jenkins-cloud-plugin

labelStr = label.toString();

代码示例来源:origin: carlossg/jenkins-kubernetes-plugin

"Template instance cap of {0} reached for template {1}, not provisioning: {2} running or errored in namespace {3} with label \"{4}\" and Kubernetes labels {5}",
    new Object[] { template.getInstanceCap(), template.getName(), slaveListItems.size(),
        templateNamespace, label == null ? "" : label.toString(), labelsMap });
return false; // maxed out

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

Queue.getInstance().cancel(item);
  throw new AbortException(MessageFormat.format("Killed {0} after waiting for {1} ms because we assume unknown Node {1} is never going to appear!",
      new Object[]{item, TIMEOUT_WAITING_FOR_NODE_MILLIS, placeholder.getAssignedLabel().toString()}));

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

public MesosSlaveInfo getMesosSlaveInfoForLabel(Label label) {
 if (!matchesLabel(label)) {
  return null;
 }
 if (label == null) {
  if (getLabelString() == null) {
   return this;
  } else {
   return null;
  }
 }
 if (label.matches(Label.parse(getLabelString()))) {
  return this;
 }
 if (!containerInfo.getDockerImageCustomizable()) {
  return null;
 }
 String customImage = getCustomImage(label);
 if (customImage == null) {
  return null;
 }
 return copyWithDockerImage(label.toString(), customImage);
}

相关文章