Skip to content

Commit

Permalink
fix: skip creation of empty ArgoCD environment file
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebradil committed Jan 28, 2025
1 parent 753ad11 commit dfcb78b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/myks/plugin_argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ func (e *Environment) renderArgoCD() (err error) {
if err != nil {
return err
}
if res.Stdout == "" {
log.Info().Msg(e.Msg("ArgoCD environment (AppProject and repository Secret) yaml is empty"))
return nil
}

argoDestinationPath := filepath.Join(e.getArgoCDDestinationDir(), getArgoCDEnvFileName(e.ID))
return writeFile(argoDestinationPath, []byte(res.Stdout))
Expand Down

0 comments on commit dfcb78b

Please sign in to comment.