Skip to content

Commit

Permalink
feat(pipeline executions/orca): Add configurable default for skipDown…
Browse files Browse the repository at this point in the history
…streamOutput flag (#4080)

Co-authored-by: Iulian Titiriga <titiriga@adobe.com>
  • Loading branch information
titirigaiulian and Iulian Titiriga committed Jul 21, 2021
1 parent 9ae00f1 commit d60c1b4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class PipelineStage implements StageDefinitionBuilder, CancellableStage {

private final Logger log = LoggerFactory.getLogger(getClass());

@Value("${stages.pipeline.defaultSkipDownstreamOutput:false}")
private boolean defaultSkipDownstreamOutput;

public static final String PIPELINE_CONFIG_TYPE =
StageDefinitionBuilder.getType(PipelineStage.class);

Expand Down Expand Up @@ -137,7 +141,7 @@ public boolean canManuallySkip(StageExecution stage) {
private boolean shouldSkipDownstreamOutput(StageExecution stage) {
return stage
.getContext()
.getOrDefault("skipDownstreamOutput", "false")
.getOrDefault("skipDownstreamOutput", defaultSkipDownstreamOutput)
.toString()
.equals("true");
}
Expand Down

0 comments on commit d60c1b4

Please sign in to comment.