本文整理了Java中hudson.model.Label.getName()
方法的一些代码示例,展示了Label.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getName()
方法的具体详情如下:
包路径:hudson.model.Label
类名称:Label
方法名:getName
[英]Alias for #getDisplayName().
[中]#getDisplayName()的别名。
代码示例来源:origin: jenkinsci/jenkins
public String getShortDescription() {
return Messages.Queue_WaitingForNextAvailableExecutorOn(label.getName());
}
}
代码示例来源:origin: jenkinsci/jenkins
public String getShortDescription() {
if (label.isEmpty()) {
return Messages.Queue_LabelHasNoNodes(label.getName());
} else {
return Messages.Queue_AllNodesOffline(label.getName());
}
}
}
代码示例来源:origin: jenkinsci/jenkins
public AutoCompletionCandidates doAutoCompleteLabel(@QueryParameter String value) {
AutoCompletionCandidates c = new AutoCompletionCandidates();
Set<Label> labels = Jenkins.getInstance().getLabels();
List<String> queries = new AutoCompleteSeeder(value).getSeeds();
for (String term : queries) {
for (Label l : labels) {
if (l.getName().startsWith(term)) {
c.add(l.getName());
}
}
}
return c;
}
代码示例来源:origin: jenkinsci/jenkins
j.getRootUrl(), Util.escape(l.getName()), l.getUrl(), l.getNodes().size(), l.getClouds().size())
);
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public String getShortDescription() {
return Messages.Queue_WaitingForNextAvailableExecutorOn(label.getName());
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
public String getShortDescription() {
return Messages.Queue_AllNodesOffline(label.getName());
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
public String getShortDescription() {
return Messages.Queue_WaitingForNextAvailableExecutorOn(label.getName());
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public String getShortDescription() {
return Messages.Queue_AllNodesOffline(label.getName());
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public String getShortDescription() {
return Messages.Queue_WaitingForNextAvailableExecutorOn(label.getName());
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public String getShortDescription() {
return Messages.Queue_WaitingForNextAvailableExecutorOn(label.getName());
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public String getShortDescription() {
return Messages.Queue_AllNodesOffline(label.getName());
}
}
代码示例来源:origin: hudson/hudson-2.x
public String getShortDescription() {
return Messages.Queue_AllNodesOffline(label.getName());
}
}
代码示例来源:origin: awslabs/ec2-spot-jenkins-plugin
@Override public boolean canProvision(final Label label) {
boolean result = fleet != null && (label == null || Label.parse(this.labelString).containsAll(label.listAtoms()));
LOGGER.log(Level.FINE, "CanProvision called on fleet: \"" + this.labelString + "\" wanting: \"" + (label == null ? "(unspecified)" : label.getName()) + "\". Returning " + Boolean.toString(result) + ".");
return result;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public String getShortDescription() {
if (label.isEmpty()) {
return Messages.Queue_LabelHasNoNodes(label.getName());
} else {
return Messages.Queue_AllNodesOffline(label.getName());
}
}
}
代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-durable-task-step
public AutoCompletionCandidates doAutoCompleteLabel(@QueryParameter String value) {
AutoCompletionCandidates c = new AutoCompletionCandidates();
Jenkins j = Jenkins.getInstance();
if (j != null) {
for (Label label : j.getLabels()) {
if (label.getName().startsWith(value)) {
c.add(label.getName());
}
}
}
return c;
}
代码示例来源:origin: jenkinsci/promoted-builds-plugin
public AutoCompletionCandidates doAutoCompleteAssignedLabelString(@QueryParameter String value) {
AutoCompletionCandidates c = new AutoCompletionCandidates();
Set<Label> labels = JenkinsHelper.getInstance().getLabels();
List<String> queries = new AutoCompleteSeeder(value).getSeeds();
for (String term : queries) {
for (Label l : labels) {
if (l.getName().startsWith(term)) {
c.add(l.getName());
}
}
}
return c;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public AutoCompletionCandidates doAutoCompleteLabel(@QueryParameter String value) {
AutoCompletionCandidates c = new AutoCompletionCandidates();
Set<Label> labels = Jenkins.getInstance().getLabels();
List<String> queries = new AutoCompleteSeeder(value).getSeeds();
for (String term : queries) {
for (Label l : labels) {
if (l.getName().startsWith(term)) {
c.add(l.getName());
}
}
}
return c;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public AutoCompletionCandidates doAutoCompleteAssignedLabelString(@QueryParameter String value) {
AutoCompletionCandidates c = new AutoCompletionCandidates();
Set<Label> labels = Hudson.getInstance().getLabels();
List<String> queries = new AutoCompleteSeeder(value).getSeeds();
for (String term : queries) {
for (Label l : labels) {
if (l.getName().startsWith(term)) {
c.add(l.getName());
}
}
}
return c;
}
}
代码示例来源:origin: jenkinsci/kubernetes-ci-plugin
public void addLabels(Pod podToDeploy, PodDeploymentContext deploymentContext) {
Map<String, String> podLabels = podToDeploy.getMetadata().getLabels();
final Label jobLabel = deploymentContext.getJobLabel();
if (jobLabel != null) {
podLabels.put(ELASTICKUBE_COM_JENKINS_LABEL, jobLabel.getName() );
LOGGER.info("JobLabel [" + ELASTICKUBE_COM_JENKINS_LABEL + " = " + jobLabel.getName() + "] added to Pod ");
}
final String podName = podToDeploy.getMetadata().getName();
podLabels.put(ELASTICKUBE_COM_JENKINS_SLAVE, podName);
LOGGER.info("Label [" + ELASTICKUBE_COM_JENKINS_SLAVE + " = " + podName + "] added to Pod ");
podToDeploy.getMetadata().setLabels(podLabels);
}
}
代码示例来源:origin: openshift/jenkins-cloud-plugin
protected boolean isBuildRunning(Label label) {
boolean running = false;
Job job = (Job) Hudson.getInstance().getItem(label.getName());
if (job != null) {
Queue.Item item = job.getQueueItem();
if (item != null)
running = true;
}
return running;
}
内容来源于网络,如有侵权,请联系作者删除!