/** * If there's no such label defined in {@link Node} or {@link Cloud}. * This is usually used as a signal that this label is invalid. */ public boolean isEmpty() { return getNodes().isEmpty() && getClouds().isEmpty(); }
/** * Can jobs be assigned to this label? * <p> * The answer is yes if there is a reasonable basis to believe that Hudson can have * an executor under this label, given the current configuration. This includes * situations such as (1) there are offline agents that have this label (2) clouds exist * that can provision agents that have this label. */ public boolean isAssignable() { for (Node n : getNodes()) if(n.getNumExecutors()>0) return true; return !getClouds().isEmpty(); }
/** * 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)); }
private WorkspaceOfflineReason workspaceOffline(R build) throws IOException, InterruptedException { FilePath ws = build.getWorkspace(); Label label = getAssignedLabel(); if (isAllSuitableNodesOffline(build)) { Collection<Cloud> applicableClouds = label == null ? Jenkins.getInstance().clouds : label.getClouds(); return applicableClouds.isEmpty() ? WorkspaceOfflineReason.all_suitable_nodes_are_offline : WorkspaceOfflineReason.use_ondemand_slave; } if (ws==null || !ws.exists()) { return WorkspaceOfflineReason.nonexisting_workspace; } Node builtOn = build.getBuiltOn(); if (builtOn == null) { // node built-on doesn't exist anymore return WorkspaceOfflineReason.builton_node_gone; } if (builtOn.toComputer() == null) { // node still exists, but has 0 executors - o.s.l.t. return WorkspaceOfflineReason.builton_node_no_executors; } return null; }
j.getRootUrl(), Util.escape(l.getName()), l.getUrl(), l.getNodes().size(), l.getClouds().size()) );
/** * If there's no such label defined in {@link Node} or {@link Cloud}. * This is usually used as a signal that this label is invalid. */ public boolean isEmpty() { return getNodes().isEmpty() && getClouds().isEmpty(); }
/** * If there's no such label defined in {@link Node} or {@link Cloud}. * This is usually used as a signal that this label is invalid. */ public boolean isEmpty() { return getNodes().isEmpty() && getClouds().isEmpty(); }
/** * If there's no such label defined in {@link Node} or {@link Cloud}. * This is usually used as a signal that this label is invalid. */ public boolean isEmpty() { return getNodes().isEmpty() && getClouds().isEmpty(); }
/** * If there's no such label defined in {@link Node} or {@link Cloud}. * This is usually used as a signal that this label is invalid. */ public boolean isEmpty() { return getNodes().isEmpty() && getClouds().isEmpty(); }
/** * If there's no such label defined in {@link Node} or {@link Cloud}. This * is usually used as a signal that this label is invalid. */ public boolean isEmpty() { return getNodes().isEmpty() && getClouds().isEmpty(); }
/** * Can jobs be assigned to this label? * <p> * The answer is yes if there is a reasonable basis to believe that Hudson can have * an executor under this label, given the current configuration. This includes * situations such as (1) there are offline slaves that have this label (2) clouds exist * that can provision slaves that have this label. */ public boolean isAssignable() { for (Node n : getNodes()) if(n.getNumExecutors()>0) return true; return !getClouds().isEmpty(); }
/** * Can jobs be assigned to this label? * <p> * The answer is yes if there is a reasonable basis to believe that Hudson can have * an executor under this label, given the current configuration. This includes * situations such as (1) there are offline agents that have this label (2) clouds exist * that can provision agents that have this label. */ public boolean isAssignable() { for (Node n : getNodes()) if(n.getNumExecutors()>0) return true; return !getClouds().isEmpty(); }
/** * Can jobs be assigned to this label? * <p> * The answer is yes if there is a reasonable basis to believe that Hudson can have * an executor under this label, given the current configuration. This includes * situations such as (1) there are offline slaves that have this label (2) clouds exist * that can provision slaves that have this label. */ public boolean isAssignable() { for (Node n : getNodes()) if(n.getNumExecutors()>0) return true; return !getClouds().isEmpty(); }
/** * Can jobs be assigned to this label? * <p> * The answer is yes if there is a reasonable basis to believe that Hudson can have * an executor under this label, given the current configuration. This includes * situations such as (1) there are offline slaves that have this label (2) clouds exist * that can provision slaves that have this label. */ public boolean isAssignable() { for (Node n : getNodes()) if(n.getNumExecutors()>0) return true; return !getClouds().isEmpty(); }
/** * Can jobs be assigned to this label? <p> The answer is yes if there is a * reasonable basis to believe that Hudson can have an executor under this * label, given the current configuration. This includes situations such as * (1) there are offline slaves that have this label (2) clouds exist that * can provision slaves that have this label. */ public boolean isAssignable() { for (Node n : getNodes()) { if (n.getNumExecutors() > 0) { return true; } } return !getClouds().isEmpty(); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); }