Skip to content

Commit

Permalink
chore: remove redeploy usage (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
erebe authored Jan 8, 2024
1 parent 6ded257 commit cec18db
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/environment_redeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
10 changes: 5 additions & 5 deletions utils/qovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit cec18db

Please sign in to comment.