Skip to content

Commit

Permalink
OP-22308: Adding VerifyApplicationHasNoDependenciesTask class to dele…
Browse files Browse the repository at this point in the history
…teApplication task. (#228)
  • Loading branch information
emanipravallika authored Jul 31, 2024
1 parent 5e383b6 commit 409a5de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import javax.validation.constraints.NotNull;

import com.netflix.spinnaker.orca.applications.tasks.VerifyApplicationHasNoDependenciesTask;
import org.pf4j.Extension;
import org.springframework.stereotype.Component;

Expand All @@ -21,6 +22,7 @@ public class DeleteApplicationStage implements StageDefinitionBuilder {
public void taskGraph(@NotNull StageExecution stage, @NotNull TaskNode.Builder builder) {

builder.withTask("validateApplication", RBACValidationTask.class)
.withTask("verifyNoDependencies", VerifyApplicationHasNoDependenciesTask.class)
.withTask("deleteTask", DeleteApplicationTask.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ public TaskResult execute(StageExecution stage) {

if (stage.getType().equalsIgnoreCase("CreateApplication")) {
finalInput = getOpaInput(application, "createApp", groupList, stage.getExecution().getAuthentication().getUser());
} else {
} else if (stage.getType().equalsIgnoreCase("UpdateApplication")){
finalInput = getOpaInput(application, "updateApp", groupList, stage.getExecution().getAuthentication().getUser());
} else {
finalInput = getOpaInput(application, "deleteApp", groupList, stage.getExecution().getAuthentication().getUser());
}


Expand Down

0 comments on commit 409a5de

Please sign in to comment.