Skip to content

Commit 4173a74

Browse files
fixed not removing runtime from isc - no git-integrations (#541)
* fixed not removing runtime from isc - no git-integrations * wip
1 parent 63a22be commit 4173a74

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.483
1+
VERSION=v0.0.484
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/runtime.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ func removeGitIntegrations(ctx context.Context, opts *RuntimeUninstallOptions) e
253253
}
254254
}
255255

256+
log.G(ctx).Info("Removed runtime git integrations")
257+
256258
return nil
257259
}
258260

@@ -496,23 +498,23 @@ func runRuntimeUninstall(ctx context.Context, opts *RuntimeUninstallOptions) err
496498

497499
log.G(ctx).Infof("Uninstalling runtime \"%s\" - this process may take a few minutes...", opts.RuntimeName)
498500

499-
err = removeGitIntegrations(ctx, opts)
501+
err = removeRuntimeIsc(ctx, opts.RuntimeName)
500502
if opts.Force {
501503
err = nil
502504
}
503-
handleCliStep(reporter.UninstallStepRemoveGitIntegrations, "Removing git integrations", err, false, true)
505+
handleCliStep(reporter.UninstallStepRemoveRuntimeIsc, "Removing runtime ISC", err, false, true)
504506
if err != nil {
505-
summaryArr = append(summaryArr, summaryLog{"you can attempt to uninstall again with the \"--force\" flag", Info})
506-
return err
507+
return fmt.Errorf("failed to remove runtime isc: %w", err)
507508
}
508509

509-
err = removeRuntimeIsc(ctx, opts.RuntimeName)
510+
err = removeGitIntegrations(ctx, opts)
510511
if opts.Force {
511512
err = nil
512513
}
513-
handleCliStep(reporter.UninstallStepRemoveRuntimeIsc, "Removing runtime ISC", err, false, true)
514+
handleCliStep(reporter.UninstallStepRemoveGitIntegrations, "Removing git integrations", err, false, true)
514515
if err != nil {
515-
return fmt.Errorf("failed to remove runtime isc: %w", err)
516+
summaryArr = append(summaryArr, summaryLog{"you can attempt to uninstall again with the \"--force\" flag", Info})
517+
return err
516518
}
517519

518520
if !opts.skipAutopilotUninstall {
@@ -545,7 +547,7 @@ func runRuntimeUninstall(ctx context.Context, opts *RuntimeUninstallOptions) err
545547
return err
546548
}
547549

548-
log.G(ctx).Infof("Deleting runtime '%s' from platform", opts.RuntimeName)
550+
log.G(ctx).Infof("Deleting runtime \"%s\" from platform", opts.RuntimeName)
549551
if opts.Managed {
550552
_, err = cfConfig.NewClient().V2().Runtime().DeleteManaged(ctx, opts.RuntimeName)
551553
} else {

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.483/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.484/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.483/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.484/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 1.0.1
8-
version: 0.0.483
8+
version: 0.0.484
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/reporter/reporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ const (
108108
UninstallPhaseStart CliStep = "uninstall.run.phase.start"
109109
UninstallStepCheckRuntimeExists CliStep = "uninstall.run.step.check-runtime-exists"
110110
UninstallStepUninstallRepo CliStep = "uninstall.run.step.uninstall-repo"
111-
UninstallStepRemoveGitIntegrations CliStep = "uninstall.run.step.remove-git-integrations"
112111
UninstallStepRemoveRuntimeIsc CliStep = "uninstall.run.step.remove-runtime-isc"
112+
UninstallStepRemoveGitIntegrations CliStep = "uninstall.run.step.remove-git-integrations"
113113
UninstallStepDeleteRuntimeFromPlatform CliStep = "uninstall.run.step.delete-runtime-from-platform"
114114
UninstallPhaseFinish CliStep = "uninstall.run.phase.finish"
115115

0 commit comments

Comments
 (0)