Skip to content

Commit

Permalink
Add test condition to check if params are not null
Browse files Browse the repository at this point in the history
Signed-off-by: cmoulliard <[email protected]>
  • Loading branch information
cmoulliard committed Aug 12, 2024
1 parent cbc2db4 commit 43b0793
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ private static PipelineTask createTaskWithEmbeddedScript(Action action, List<Wor
PipelineTask pipelineTask = new PipelineTaskBuilder()
// @formatter:off
.withName(action.getName())
.withParams(action.getParams() != null ? populatePipelineParams(action.getParams()) : null)
.withWorkspaces(populateTaskWorkspaces(action, workspaces))
.withTaskSpec(
new EmbeddedTaskBuilder()
Expand Down Expand Up @@ -191,7 +192,8 @@ private static PipelineTask createTaskUsingRef(Action action, List<Workspace> wo
.addNewParam().withName("name").withValue(new ParamValue(action.getName())).endParam()
.addNewParam().withName("kind").withValue(new ParamValue("task")).endParam()
.endTaskRef()
.withWorkspaces(populateTaskWorkspaces(action, workspaces))
.withWorkspaces(populateTaskWorkspaces(action, workspaces))
.withParams(action.getParams() != null ? populatePipelineParams(action.getParams()) : null)
.build();
// @formatter:on
return pipelineTask;
Expand Down

0 comments on commit 43b0793

Please sign in to comment.