.collect(Collectors.toMap(Stage::getRefId, s -> s.getStatus().toString().toLowerCase()));
.stageStatus(pipeline.getStages() .stream() .map(stage -> new StageMetadata(stage.getType(), stage.getName(), stage.getStatus())) .collect(Collectors.toList())) .complete(isComplete)
private static Predicate<Stage> matchesDeployedStage(String ...id) { List<String> idsOrNames = Arrays.asList(id); if (!idsOrNames.isEmpty()){ return stage -> DEPLOY_STAGE_NAMES.contains(stage.getType()) && stage.getContext().containsKey("deploy.server.groups") && stage.getStatus() == ExecutionStatus.SUCCEEDED && (idsOrNames.contains(stage.getName()) || idsOrNames.contains(stage.getId())); } else { return stage -> DEPLOY_STAGE_NAMES.contains(stage.getType()) && stage.getContext().containsKey("deploy.server.groups") && stage.getStatus() == ExecutionStatus.SUCCEEDED; } } }
stage.getExecution().getStages() .stream() .filter(s -> lockTypes.contains(s.getType()) && s.getStatus() == ExecutionStatus.SUCCEEDED) .forEach(s -> { LockContext lc = s.mapTo("/lock", LockContext.LockContextBuilder.class).withStage(s).build();
public StageComplete( @Nonnull Object source, @Nonnull Stage stage ) { this(source, stage.getExecution().getType(), stage.getExecution().getId(), stage.getId(), stage.getType(), stage.getName(), stage.getStatus()); }
map.put(prefix + "endTime", stage.getEndTime() != null ? stage.getEndTime().toString() : null); map.put(prefix + "startTimeExpiry", stage.getStartTimeExpiry() != null ? String.valueOf(stage.getStartTimeExpiry()) : null); map.put(prefix + "status", stage.getStatus().name()); map.put(prefix + "syntheticStageOwner", stage.getSyntheticStageOwner() != null ? stage.getSyntheticStageOwner().name() : null); map.put(prefix + "parentStageId", stage.getParentStageId());
.collect(Collectors.toMap(Stage::getRefId, s -> s.getStatus().toString().toLowerCase()));
.stageStatus(pipeline.getStages() .stream() .map(stage -> new StageMetadata(stage.getType(), stage.getName(), stage.getStatus())) .collect(Collectors.toList())) .complete(isComplete)