Skip to content

Commit

Permalink
Merge pull request #697 from romanisb/args/no-build-logs
Browse files Browse the repository at this point in the history
Add --no-build-logs option to disable writing builds logs to stdout
  • Loading branch information
oleg-nenashev authored Jun 26, 2023
2 parents 0d86758 + b005ef4 commit e21031b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,9 @@ public class PipelineRunOptions extends PipelineOptions {
@CommandLine.Option(names = { "-pc", "--pipeline-configuration" },
description = "The Pipeline Configuration File when using the Jenkins Templating Engine")
public File pipelineConfiguration;

@CommandLine.Option(names = { "-nbl", "--no-build-logs" },
description = "Disable writing build logs to stdout. " +
"Plugins that handle build logs will process them as usual")
public boolean noBuildLogs = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ public int run(PipelineRunOptions runOptions) throws Exception {

b = f.getStartCondition().get();

writeLogTo(System.out);
if (!runOptions.noBuildLogs) {
writeLogTo(System.out);
}

f.get(); // wait for the completion
return b.getResult().ordinal;
Expand Down

0 comments on commit e21031b

Please sign in to comment.