Skip to content

Commit

Permalink
fix: pass autodeploy param to services update
Browse files Browse the repository at this point in the history
CLI service update didn't pass `AutoDeploy` param to qovery backend which fallbacks to `true` by default.

Ticket: ENG-1618
  • Loading branch information
benjaminch committed Oct 26, 2023
1 parent 53da687 commit 18eb2aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/application_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var applicationUpdateCmd = &cobra.Command{
Ports: application.Ports,
Arguments: application.Arguments,
Entrypoint: application.Entrypoint,
AutoDeploy: *qovery.NewNullableBool(application.AutoDeploy),
}

if applicationBranch != "" {
Expand Down
1 change: 1 addition & 0 deletions cmd/container_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ var containerUpdateCmd = &cobra.Command{
MaxRunningInstances: utils.Int32(container.MaxRunningInstances),
Healthchecks: container.Healthchecks,
AutoPreview: utils.Bool(container.AutoPreview),
AutoDeploy: *qovery.NewNullableBool(container.AutoDeploy),
}

_, res, err := client.ContainerMainCallsAPI.EditContainer(context.Background(), container.Id).ContainerRequest(req).Execute()
Expand Down
2 changes: 1 addition & 1 deletion cmd/lifecycle_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var lifecycleUpdateCmd = &cobra.Command{
}

docker := lifecycle.Source.JobResponseAllOfSourceOneOf1.Docker
image := lifecycle.Source.JobResponseAllOfSourceOneOf.Image
image := lifecycle.Source.JobResponseAllOfSourceOneOf.Image

if docker != nil && (lifecycleTag != "" || lifecycleImageName != "") {
utils.PrintlnError(fmt.Errorf("you can't use --tag or --image-name with a lifecycle targetting a Dockerfile. Use --branch instead"))
Expand Down
1 change: 1 addition & 0 deletions utils/qovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -2108,6 +2108,7 @@ func ToJobRequest(job qovery.JobResponse) qovery.JobRequest {
Source: &source,
Healthchecks: job.Healthchecks,
Schedule: &schedule,
AutoDeploy: *qovery.NewNullableBool(job.AutoDeploy),
}
}

Expand Down

0 comments on commit 18eb2aa

Please sign in to comment.