@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getAgent() != null ? getAgent().hashCode() : 0); result = 31 * result + (getWhen() != null ? getWhen().hashCode() : 0); result = 31 * result + (getPost() != null ? getPost().hashCode() : 0); result = 31 * result + (getTools() != null ? getTools().hashCode() : 0); result = 31 * result + (getEnvironment() != null ? getEnvironment().hashCode() : 0); result = 31 * result + (getStages() != null ? getStages().hashCode() : 0); result = 31 * result + (getBranches() != null ? getBranches().hashCode() : 0); result = 31 * result + (getFailFast() != null ? getFailFast().hashCode() : 0); result = 31 * result + (getParallel() != null ? getParallel().hashCode() : 0); result = 31 * result + (getOptions() != null ? getOptions().hashCode() : 0); result = 31 * result + (getInput() != null ? getInput().hashCode() : 0); result = 31 * result + (getParallelContent() != null ? getParallelContent().hashCode() : 0); return result; } }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getAgent() != null ? getAgent().hashCode() : 0); result = 31 * result + (getBranches() != null ? getBranches().hashCode() : 0); result = 31 * result + (getWhen() != null ? getWhen().hashCode() : 0); result = 31 * result + (getPost() != null ? getPost().hashCode() : 0); result = 31 * result + (getTools() != null ? getTools().hashCode() : 0); result = 31 * result + (getEnvironment() != null ? getEnvironment().hashCode() : 0); result = 31 * result + (getFailFast() != null ? getFailFast().hashCode() : 0); result = 31 * result + (getParallel() != null ? getParallel().hashCode() : 0); return result; } }
if ("parent".equals(s.getName())) { parentStage = s; assertNull(parentStage.getParallel()); List<ModelASTStage> parallelContent = parentStage.getParallelContent(); assertNotNull(parallelContent); assertEquals(2, parallelContent.size()); ModelASTStage branchTwo = null; for (ModelASTStage s : parallelContent) { if ("branch-one".equals(s.getName())) { branchOne = s; } else if ("branch-two".equals(s.getName())) { branchTwo = s;
assertNull(stage.getSourceLocation()); assertNotNull(stage); assertEquals(1, stage.getBranches().size()); ModelASTBranch firstBranch = branchForName("default", stage.getBranches()); assertNotNull(firstBranch); assertNull(firstBranch.getSourceLocation());
@Exported public List<String> getRestartableStages() { List<String> stages = new ArrayList<>(); FlowExecution execution = getExecution(); if (execution != null) { ExecutionModelAction execAction = run.getAction(ExecutionModelAction.class); if (execAction != null) { if (execAction.getStages() != null) { for (ModelASTStage s : execAction.getStages().getStages()) { if (!Utils.stageHasStatusOf(s.getName(), execution, StageStatus.getSkippedForFailure(), StageStatus.getSkippedForUnstable())) { stages.add(s.getName()); } } } } } return stages; }
if (stage.getBranches().size() == 1) { ModelASTBranch branch = stage.getBranches().get(0); body.setCode(handleBranch(branch)); } else { MapExpression newParallelMap = new MapExpression(); for (ModelASTBranch b : stage.getBranches()) { newParallelMap.addMapEntryExpression(constX(b.getName()), closureX(handleBranch(b)));
if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) { return false; if (getAgent() != null ? !getAgent().equals(that.getAgent()) : that.getAgent() != null) { return false; if (getPost() != null ? !getPost().equals(that.getPost()) : that.getPost() != null) { return false; if (getWhen() != null ? !getWhen().equals(that.getWhen()) : that.getWhen() != null) { return false; if (getFailFast() != null ? !getFailFast().equals(that.getFailFast()) : that.getFailFast() != null) { return false; if (getParallel() != null ? !getParallel().equals(that.getParallel()) : that.getParallel() != null) { return false; if (getTools() != null ? !getTools().equals(that.getTools()) : that.getTools() != null) { return false; if (getEnvironment() != null ? !getEnvironment().equals(that.getEnvironment()) : that.getEnvironment() != null) { return false; return getBranches() != null ? getBranches().equals(that.getBranches()) : that.getBranches() == null;
assertNull(stage.getSourceLocation()); assertNotNull(stage); assertEquals(2, stage.getBranches().size()); ModelASTBranch firstBranch = branchForName("first", stage.getBranches()); assertNotNull(firstBranch); assertNull(firstBranch.getSourceLocation()); assertNull(val.getSourceLocation()); ModelASTBranch secondBranch = branchForName("second", stage.getBranches()); assertNotNull(secondBranch); assertNull(secondBranch.getSourceLocation());
if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) { return false; if (getAgent() != null ? !getAgent().equals(that.getAgent()) : that.getAgent() != null) { return false; if (getPost() != null ? !getPost().equals(that.getPost()) : that.getPost() != null) { return false; if (getWhen() != null ? !getWhen().equals(that.getWhen()) : that.getWhen() != null) { return false; if (getTools() != null ? !getTools().equals(that.getTools()) : that.getTools() != null) { return false; if (getEnvironment() != null ? !getEnvironment().equals(that.getEnvironment()) : that.getEnvironment() != null) { return false; if (getOptions() != null ? !getOptions().equals(that.getOptions()) : that.getOptions() != null) { return false; if (getInput() != null ? !getInput().equals(that.getInput()) : that.getInput() != null) { return false; if (getStages() != null ? !getStages().equals(that.getStages()) : that.getStages() != null) { return false; if (getFailFast() != null ? !getFailFast().equals(that.getFailFast()) : that.getFailFast() != null) { return false;