Only set ComputeID value when `--compute-id` flag provided (#1229)

## Changes
Fixes an issue when `compute_id` is defined in the bundle config,
correctly replaced in `validate` command but not used in `deploy`
command

## Tests
Manually
This commit is contained in:
Andrew Nester 2024-02-22 16:14:06 +01:00 committed by GitHub
parent 1588a14d07
commit 1b4a774609
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,9 @@ func newDeployCommand() *cobra.Command {
bundle.ApplyFunc(ctx, b, func(context.Context, *bundle.Bundle) error { bundle.ApplyFunc(ctx, b, func(context.Context, *bundle.Bundle) error {
b.Config.Bundle.Force = force b.Config.Bundle.Force = force
b.Config.Bundle.Deployment.Lock.Force = forceLock b.Config.Bundle.Deployment.Lock.Force = forceLock
if cmd.Flag("compute-id").Changed {
b.Config.Bundle.ComputeID = computeID b.Config.Bundle.ComputeID = computeID
}
if cmd.Flag("fail-on-active-runs").Changed { if cmd.Flag("fail-on-active-runs").Changed {
b.Config.Bundle.Deployment.FailOnActiveRuns = failOnActiveRuns b.Config.Bundle.Deployment.FailOnActiveRuns = failOnActiveRuns