2
0

deploy.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package v2
  2. import (
  3. "context"
  4. "fmt"
  5. api "github.com/porter-dev/porter/api/client"
  6. "github.com/porter-dev/porter/cli/cmd/config"
  7. )
  8. // UpdateFull implements the functionality of the `porter build` command for validate apply v2 projects
  9. func UpdateFull(ctx context.Context, cliConf config.CLIConfig, client api.Client, appName string) error {
  10. // use empty string for porterYamlPath,legacy projects wont't have a v2 porter.yaml
  11. var porterYamlPath string
  12. inp := ApplyInput{
  13. CLIConfig: cliConf,
  14. Client: client,
  15. PorterYamlPath: porterYamlPath,
  16. AppName: appName,
  17. }
  18. err := Apply(ctx, inp)
  19. if err != nil {
  20. return err
  21. }
  22. return nil
  23. }
  24. // UpdateBuild implements the functionality of the `porter apply` command for validate apply v2 projects
  25. func UpdateBuild(ctx context.Context) error {
  26. fmt.Println("This command is not supported for your project. Contact support@porter.run for more information.")
  27. return nil
  28. }
  29. // UpdateUpgrade implements the functionality of the `porter config` command for validate apply v2 projects
  30. func UpdateUpgrade(ctx context.Context) error {
  31. fmt.Println("This command is not supported for your project. Contact support@porter.run for more information.")
  32. return nil
  33. }