@@ -18,10 +18,8 @@ package deployment
1818
1919import (
2020 "context"
21- "errors"
2221 "fmt"
2322 bean2 "github.com/devtron-labs/devtron/api/bean/gitOps"
24- "github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/timelineStatus"
2523 "github.com/devtron-labs/devtron/internal/util"
2624 appStoreBean "github.com/devtron-labs/devtron/pkg/appStore/bean"
2725 appStoreDiscoverRepository "github.com/devtron-labs/devtron/pkg/appStore/discover/repository"
@@ -245,50 +243,6 @@ func (impl *FullModeDeploymentServiceImpl) createGitOpsRepo(gitOpsRepoName strin
245243 return repoUrl , isNew , err
246244}
247245
248- func (impl * FullModeDeploymentServiceImpl ) updateValuesYamlInGit (installAppVersionRequest * appStoreBean.InstallAppVersionDTO ) (* appStoreBean.InstallAppVersionDTO , error ) {
249- valuesString , err := impl .appStoreDeploymentCommonService .GetValuesString (installAppVersionRequest .AppStoreName , installAppVersionRequest .ValuesOverrideYaml )
250- if err != nil {
251- impl .Logger .Errorw ("error in getting values string" , "err" , err )
252- return nil , err
253- }
254-
255- valuesGitConfig , err := impl .getGitCommitConfig (installAppVersionRequest , valuesString , appStoreBean .VALUES_YAML_FILE )
256- if err != nil {
257- impl .Logger .Errorw ("error in getting git commit config" , "err" , err )
258- }
259-
260- commitHash , _ , err := impl .gitOperationService .CommitValues (context .Background (), valuesGitConfig )
261- if err != nil {
262- impl .Logger .Errorw ("error in git commit" , "err" , err )
263- return installAppVersionRequest , errors .New (timelineStatus .TIMELINE_STATUS_GIT_COMMIT_FAILED .ToString ())
264- }
265- //update timeline status for git commit state
266- installAppVersionRequest .GitHash = commitHash
267- return installAppVersionRequest , nil
268- }
269-
270- func (impl * FullModeDeploymentServiceImpl ) updateRequirementYamlInGit (installAppVersionRequest * appStoreBean.InstallAppVersionDTO , appStoreAppVersion * appStoreDiscoverRepository.AppStoreApplicationVersion ) error {
271- requirementsString , err := impl .appStoreDeploymentCommonService .GetRequirementsString (appStoreAppVersion )
272- if err != nil {
273- impl .Logger .Errorw ("error in getting requirements string" , "err" , err )
274- return err
275- }
276-
277- requirementsGitConfig , err := impl .getGitCommitConfig (installAppVersionRequest , requirementsString , appStoreBean .REQUIREMENTS_YAML_FILE )
278- if err != nil {
279- impl .Logger .Errorw ("error in getting git commit config" , "err" , err )
280- return err
281- }
282-
283- _ , _ , err = impl .gitOperationService .CommitValues (context .Background (), requirementsGitConfig )
284- if err != nil {
285- impl .Logger .Errorw ("error in values commit" , "err" , err )
286- return errors .New (timelineStatus .TIMELINE_STATUS_GIT_COMMIT_FAILED .ToString ())
287- }
288-
289- return nil
290- }
291-
292246// createChartProxyAndGetPath parse chart in local directory and returns path of local dir and values.yaml
293247func (impl * FullModeDeploymentServiceImpl ) createChartProxyAndGetPath (installAppVersionRequest * appStoreBean.InstallAppVersionDTO ) (* util.ChartCreateResponse , error ) {
294248 chartCreateRequest := adapter .ParseChartCreateRequest (installAppVersionRequest .AppName , true )
@@ -370,7 +324,7 @@ func (impl *FullModeDeploymentServiceImpl) getValuesAndRequirementForGitConfig(i
370324 }
371325
372326 }
373- values , err := impl .appStoreDeploymentCommonService .GetValuesString (appStoreAppVersion . AppStore . Name , installAppVersionRequest .ValuesOverrideYaml )
327+ values , err := impl .appStoreDeploymentCommonService .GetValuesString (appStoreAppVersion , installAppVersionRequest .ValuesOverrideYaml )
374328 if err != nil {
375329 impl .Logger .Errorw ("error in getting values fot installedAppVersionRequest" , "err" , err )
376330 return nil , nil , err
0 commit comments