Skip to content

Commit

Permalink
delete all pre-post cd at one time (#3786)
Browse files Browse the repository at this point in the history
  • Loading branch information
prakash100198 committed Aug 17, 2023
1 parent d7f571a commit 6441783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/pipeline/CiCdPipelineOrchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1466,15 +1466,15 @@ func (impl CiCdPipelineOrchestratorImpl) UpdateCDPipeline(pipelineRequest *bean.
}
}

if pipelineRequest.PreDeployStage != nil && len(pipelineRequest.PreDeployStage.Steps) > 0 {
if pipelineRequest.PreDeployStage != nil {
//updating pre stage
err = impl.pipelineStageService.UpdatePipelineStage(pipelineRequest.PreDeployStage, repository5.PIPELINE_STAGE_TYPE_PRE_CD, pipelineRequest.Id, userId)
if err != nil {
impl.logger.Errorw("error in updating pre stage", "err", err, "preDeployStage", pipelineRequest.PreDeployStage, "cdPipelineId", pipelineRequest.Id)
return err
}
}
if pipelineRequest.PostDeployStage != nil && len(pipelineRequest.PostDeployStage.Steps) > 0 {
if pipelineRequest.PostDeployStage != nil {
//updating post stage
err = impl.pipelineStageService.UpdatePipelineStage(pipelineRequest.PostDeployStage, repository5.PIPELINE_STAGE_TYPE_POST_CD, pipelineRequest.Id, userId)
if err != nil {
Expand Down

0 comments on commit 6441783

Please sign in to comment.