diff --git a/cmd/environment_redeploy.go b/cmd/environment_redeploy.go index 63eec3ec..00093203 100644 --- a/cmd/environment_redeploy.go +++ b/cmd/environment_redeploy.go @@ -44,7 +44,7 @@ var environmentRedeployCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - _, _, err = client.EnvironmentActionsAPI.RedeployEnvironment(context.Background(), envId).Execute() + _, _, err = client.EnvironmentActionsAPI.DeployEnvironment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/go.mod b/go.mod index d69043b3..56e08ca0 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/posthog/posthog-go v0.0.0-20221221115252-24dfed35d71a github.com/pterm/pterm v0.12.55 - github.com/qovery/qovery-client-go v0.0.0-20240104104714-c749f31f31e6 + github.com/qovery/qovery-client-go v0.0.0-20240108095100-718858da5460 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 56507433..bc70243f 100644 --- a/go.sum +++ b/go.sum @@ -200,6 +200,8 @@ github.com/qovery/qovery-client-go v0.0.0-20240102155005-3a6753cad4f4 h1:jF8XOqA github.com/qovery/qovery-client-go v0.0.0-20240102155005-3a6753cad4f4/go.mod h1:5QD7sC1Z6XCCYd31c4XKVwGdEOjvtgG0NDcaVDoWb+o= github.com/qovery/qovery-client-go v0.0.0-20240104104714-c749f31f31e6 h1:WRC6Gt5bWNax8UT1ZbKrK/ITCsLC/A7cq7bZtBbQSOE= github.com/qovery/qovery-client-go v0.0.0-20240104104714-c749f31f31e6/go.mod h1:5QD7sC1Z6XCCYd31c4XKVwGdEOjvtgG0NDcaVDoWb+o= +github.com/qovery/qovery-client-go v0.0.0-20240108095100-718858da5460 h1:NTLkMvIy9jfIx/X1aKpCjBwsNyTIK4sO03nZY/Zn2w4= +github.com/qovery/qovery-client-go v0.0.0-20240108095100-718858da5460/go.mod h1:5QD7sC1Z6XCCYd31c4XKVwGdEOjvtgG0NDcaVDoWb+o= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= diff --git a/utils/qovery.go b/utils/qovery.go index ad1184e9..812daa1e 100644 --- a/utils/qovery.go +++ b/utils/qovery.go @@ -2128,7 +2128,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case ApplicationType: for _, application := range statuses.GetApplications() { if application.Id == serviceId && IsTerminalState(application.State) { - _, _, err := client.ApplicationActionsAPI.RedeployApplication(context.Background(), serviceId).Execute() + _, _, err := client.ApplicationActionsAPI.DeployApplication(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -2143,7 +2143,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case DatabaseType: for _, database := range statuses.GetDatabases() { if database.Id == serviceId && IsTerminalState(database.State) { - _, _, err := client.DatabaseActionsAPI.RedeployDatabase(context.Background(), serviceId).Execute() + _, _, err := client.DatabaseActionsAPI.DeployDatabase(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -2158,7 +2158,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case ContainerType: for _, container := range statuses.GetContainers() { if container.Id == serviceId && IsTerminalState(container.State) { - _, _, err := client.ContainerActionsAPI.RedeployContainer(context.Background(), serviceId).Execute() + _, _, err := client.ContainerActionsAPI.DeployContainer(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -2173,7 +2173,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case JobType: for _, job := range statuses.GetJobs() { if job.Id == serviceId && IsTerminalState(job.State) { - _, _, err := client.JobActionsAPI.RedeployJob(context.Background(), serviceId).Execute() + _, _, err := client.JobActionsAPI.DeployJob(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -2188,7 +2188,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case HelmType: for _, helm := range statuses.GetHelms() { if helm.Id == serviceId && IsTerminalState(helm.State) { - _, _, err := client.HelmActionsAPI.RedeployHelm(context.Background(), serviceId).Execute() + _, _, err := client.HelmActionsAPI.DeployHelm(context.Background(), serviceId).Execute() if err != nil { return "", err }