Skip to content

Commit

Permalink
Merge branch 'bug_22993/can_t_deploy_configuration_state_of_the_objec…
Browse files Browse the repository at this point in the history
…t_modified_by_this_change_request_has_changed_looping_pr' into branches/rudder/7.3
  • Loading branch information
Jenkins CI committed Jul 31, 2023
2 parents d385788 + b12d57f commit 7477188
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class TwoValidationStepsWorkflowServiceImpl(
currentStep: WorkflowNodeId,
isCreator: Boolean
): WorkflowAction = {

val deployAction = {
if (canDeploy(isCreator, selfDeployment))
Seq((Deployed.id, stepValidationToDeployed _))
Expand All @@ -224,7 +225,12 @@ class TwoValidationStepsWorkflowServiceImpl(
WorkflowAction("Validate", validatorActions)

case Deployment.id =>
WorkflowAction("Deploy", deployAction)
val deploymentAction = {
(if (canDeploy(isCreator, selfValidation)) {
Seq((Deployment.id, stepDeploymentToDeployed _))
} else Seq()) ++ deployAction
}
WorkflowAction("Deploy", deploymentAction)
case Deployed.id => NoWorkflowAction
case Cancelled.id => NoWorkflowAction
case WorkflowNodeId(x) =>
Expand Down Expand Up @@ -435,6 +441,15 @@ class TwoValidationStepsWorkflowServiceImpl(
toFailure(Deployment, changeRequestId, actor, reason)
}

private[this] def stepDeploymentToDeployed(
changeRequestId: ChangeRequestId,
actor: EventActor,
reason: Option[String]
): Box[WorkflowNodeId] = {
onSuccessWorkflow(Deployment, changeRequestId, actor, reason)
}


// this THE workflow that needs external validation.
override def needExternalValidation(): Boolean = true
}

0 comments on commit 7477188

Please sign in to comment.