@@ -18,10 +18,8 @@ package deployment
18
18
19
19
import (
20
20
"context"
21
- "errors"
22
21
"fmt"
23
22
bean2 "github.com/devtron-labs/devtron/api/bean/gitOps"
24
- "github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/timelineStatus"
25
23
"github.com/devtron-labs/devtron/internal/util"
26
24
appStoreBean "github.com/devtron-labs/devtron/pkg/appStore/bean"
27
25
appStoreDiscoverRepository "github.com/devtron-labs/devtron/pkg/appStore/discover/repository"
@@ -245,50 +243,6 @@ func (impl *FullModeDeploymentServiceImpl) createGitOpsRepo(gitOpsRepoName strin
245
243
return repoUrl , isNew , err
246
244
}
247
245
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
-
292
246
// createChartProxyAndGetPath parse chart in local directory and returns path of local dir and values.yaml
293
247
func (impl * FullModeDeploymentServiceImpl ) createChartProxyAndGetPath (installAppVersionRequest * appStoreBean.InstallAppVersionDTO ) (* util.ChartCreateResponse , error ) {
294
248
chartCreateRequest := adapter .ParseChartCreateRequest (installAppVersionRequest .AppName , true )
@@ -370,7 +324,7 @@ func (impl *FullModeDeploymentServiceImpl) getValuesAndRequirementForGitConfig(i
370
324
}
371
325
372
326
}
373
- values , err := impl .appStoreDeploymentCommonService .GetValuesString (appStoreAppVersion . AppStore . Name , installAppVersionRequest .ValuesOverrideYaml )
327
+ values , err := impl .appStoreDeploymentCommonService .GetValuesString (appStoreAppVersion , installAppVersionRequest .ValuesOverrideYaml )
374
328
if err != nil {
375
329
impl .Logger .Errorw ("error in getting values fot installedAppVersionRequest" , "err" , err )
376
330
return nil , nil , err
0 commit comments