/** * called from spring timer */ public void refresh() { agentInstances.refresh(); }
public AgentInstances allAgents() { AgentInstances agents = new AgentInstances(agentStatusChangeListener); for (AgentInstance agent : currentInstances()) { agents.add(agent); } return agents; }
public AgentInstances(SystemEnvironment systemEnvironment, AgentStatusChangeListener agentStatusChangeListener, AgentInstance... agentInstances) { this(agentStatusChangeListener); this.systemEnvironment = systemEnvironment; for (AgentInstance agentInstance : agentInstances) { this.add(agentInstance); } }
private AgentInstances sample() { AgentInstances agentInstances = new AgentInstances(null); agentInstances.add(idle); agentInstances.add(building); agentInstances.add(pending); agentInstances.add(disabled); return agentInstances; }
public GoUserPrinciple(String username, String displayName, Set<GrantedAuthority> authorities) { this.username = new Username(username, displayName); this.authorities = authorities; this.displayName = displayName; }
public AgentInstance findAgentAndRefreshStatus(String uuid) { return agentInstances.findAgentAndRefreshStatus(uuid); }
public boolean isFailed() { if (checkTestCases()) { for (Iterator iterator = testCases.iterator(); iterator.hasNext();) { BuildTestCase testCase = (BuildTestCase) iterator.next(); if (testCase.getResult().equals(BuildTestCaseResult.ERROR) || testCase.getResult() .equals(BuildTestCaseResult.FAILED)) { return true; } } } return false; } }
private boolean isThisMaterialIgnored(List<PipelineConfigQueueEntry> queue, MaterialRevision revision, MaterialConfig materialConfig) { for (PipelineConfigQueueEntry pipelineConfigQueueEntry : queue) { if (pipelineConfigQueueEntry.hasMaterial(materialConfig)) { if (!pipelineConfigQueueEntry.shouldIgnore(revision)) { return false; } } } return true; }
public String toString() { return getDisplayName(); } }
public void sync(Agents agents) { agentInstances.sync(agents); }
public List getErrorTestCases() { return findTestCases(BuildTestCaseResult.ERROR); }
private boolean existsOnAnyOfPipelinesIn(List<PipelineConfigQueueEntry> queue, MaterialConfig materialConfig) { for (PipelineConfigQueueEntry pipelineConfigQueueEntry : queue) { if (pipelineConfigQueueEntry.hasMaterial(materialConfig)) { return true; } } return false; }
public AgentInstances findDisabledAgents() { return agentInstances.findDisabledAgents(); } }
private List<PipelineConfig> removePathHead(PipelineConfigDependencyGraph.PipelineConfigQueueEntry configQueueEntry) { return configQueueEntry.pathWithoutHead(); }
public static Builder newUsageStatistics() { return new Builder(); }
public void notifyJobCancelledEvent(String agentId) { agentInstances.updateAgentAboutCancelledBuild(agentId, true); }
public static Event lock(String pipelineName) { return new Event(EventType.LOCKED, pipelineName); }
public static Event unPause(String pipelineName, Username user) { return new Event(EventType.UNPAUSED, pipelineName, user); }
public List getFailingTestCases() { return findTestCases(BuildTestCaseResult.FAILED); }
public List getPassedTestCases() { return findTestCases(BuildTestCaseResult.PASSED); }