@@ -839,34 +839,10 @@ func (impl *TriggerServiceImpl) buildManifestPushTemplate(overrideRequest *bean3
839
839
manifestPushTemplate .ChartLocation = valuesOverrideResponse .EnvOverride .Chart .ChartLocation
840
840
manifestPushTemplate .RepoUrl = valuesOverrideResponse .EnvOverride .Chart .GitRepoUrl
841
841
manifestPushTemplate .IsCustomGitRepository = valuesOverrideResponse .EnvOverride .Chart .IsCustomGitRepository
842
- manifestPushTemplate .GitOpsRepoMigrationRequired = impl .checkIfRepoMigrationRequired (manifestPushTemplate )
843
842
}
844
843
return manifestPushTemplate , err
845
844
}
846
845
847
- // checkIfRepoMigrationRequired checks if gitOps repo name is changed
848
- func (impl * TriggerServiceImpl ) checkIfRepoMigrationRequired (manifestPushTemplate * bean4.ManifestPushTemplate ) bool {
849
- monoRepoMigrationRequired := false
850
- if gitOps .IsGitOpsRepoNotConfigured (manifestPushTemplate .RepoUrl ) || manifestPushTemplate .IsCustomGitRepository {
851
- return false
852
- }
853
- var err error
854
- gitOpsRepoName := impl .gitOpsConfigReadService .GetGitOpsRepoNameFromUrl (manifestPushTemplate .RepoUrl )
855
- if len (gitOpsRepoName ) == 0 {
856
- gitOpsRepoName , err = impl .getAcdAppGitOpsRepoName (manifestPushTemplate .AppName , manifestPushTemplate .EnvironmentName )
857
- if err != nil || gitOpsRepoName == "" {
858
- return false
859
- }
860
- }
861
- //here will set new git repo name if required to migrate
862
- newGitOpsRepoName := impl .gitOpsConfigReadService .GetGitOpsRepoName (manifestPushTemplate .AppName )
863
- //checking weather git repo migration needed or not, if existing git repo and new independent git repo is not same than go ahead with migration
864
- if newGitOpsRepoName != gitOpsRepoName {
865
- monoRepoMigrationRequired = true
866
- }
867
- return monoRepoMigrationRequired
868
- }
869
-
870
846
// getAcdAppGitOpsRepoName returns the GitOps repository name, configured for the argoCd app
871
847
func (impl * TriggerServiceImpl ) getAcdAppGitOpsRepoName (appName string , environmentName string ) (string , error ) {
872
848
//this method should only call in case of argo-integration and gitops configured
0 commit comments