Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamayushm committed Sep 20, 2024
1 parent 122c4c9 commit cd54d49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1325,18 +1325,16 @@ func (handler *PipelineConfigRestHandlerImpl) GetArtifactsByCDPipeline(w http.Re
return
}
//rbac block ends here
var ciArtifactResponse *bean.CiArtifactResponse
if handler.pipelineRestHandlerEnvConfig.UseArtifactListApiV2 {
artifactsListFilterOptions := &bean2.ArtifactsListFilterOptions{
Limit: limit,
Offset: offset,
SearchString: searchString,
}
ciArtifactResponse, err = handler.pipelineBuilder.RetrieveArtifactsByCDPipelineV2(pipeline, bean2.WorkflowType(stage), artifactsListFilterOptions)
} else {
//RetrieveArtifactsByCDPipeline is deprecated and method is removed from code
//ciArtifactResponse, err = handler.pipelineBuilder.RetrieveArtifactsByCDPipeline(pipeline, bean2.WorkflowType(stage))
artifactsListFilterOptions := &bean2.ArtifactsListFilterOptions{
Limit: limit,
Offset: offset,
SearchString: searchString,
}

//RetrieveArtifactsByCDPipeline is deprecated and method is removed from code
//ciArtifactResponse, err = handler.pipelineBuilder.RetrieveArtifactsByCDPipeline(pipeline, bean2.WorkflowType(stage))

ciArtifactResponse, err := handler.pipelineBuilder.RetrieveArtifactsByCDPipelineV2(pipeline, bean2.WorkflowType(stage), artifactsListFilterOptions)
if err != nil {
handler.Logger.Errorw("service err, GetArtifactsByCDPipeline", "err", err, "cdPipelineId", cdPipelineId, "stage", stage)
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import (
)

type PipelineRestHandlerEnvConfig struct {
UseArtifactListApiV2 bool `env:"USE_ARTIFACT_LISTING_API_V2" envDefault:"true"`
UseArtifactListApiV2 bool `env:"USE_ARTIFACT_LISTING_API_V2" envDefault:"true"` //deprecated
}

type DevtronAppRestHandler interface {
Expand Down
12 changes: 0 additions & 12 deletions pkg/deployment/manifest/ManifestCreationService.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,18 +710,6 @@ func (impl *ManifestCreationServiceImpl) getReleaseOverride(envOverride *chartCo
imageName := ""
tag := ""
if artifact != nil {
//artifactImage := artifact.Image
//imageTag := strings.Split(artifactImage, ":")
//
//imageTagLen := len(imageTag)
//
//for i := 0; i < imageTagLen-1; i++ {
// if i != imageTagLen-2 {
// imageName = imageName + imageTag[i] + ":"
// } else {
// imageName = imageName + imageTag[i]
// }
//}

imageName = artifact.Image
_, tag = globalUtil.ExtractImageRepoAndTag(imageName)
Expand Down

0 comments on commit cd54d49

Please sign in to comment.