Skip to content

Commit 3c43032

Browse files
CR-11610 ajdust recovery to silent installation mode (#385)
* ajdust recovery to silent installation mode * bump version * send recover field to platform * small fix * bump go-sdk * bump * bump
1 parent 9085831 commit 3c43032

File tree

6 files changed

+25
-22
lines changed

6 files changed

+25
-22
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.347
1+
VERSION=v0.0.348
22

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

cmd/commands/runtime.go

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
608608
IngressController: &ingressControllerName,
609609
ComponentNames: componentNames,
610610
Repo: &opts.InsCloneOpts.Repo,
611+
Recover: &opts.FromRepo,
611612
})
612613
handleCliStep(reporter.InstallStepCreateRuntimeOnPlatform, "Creating runtime on platform", err, false, true)
613614
if err != nil {
@@ -2372,25 +2373,27 @@ func getInstallationFromRepoApproval(ctx context.Context, opts *RuntimeInstallOp
23722373

23732374
printPreviousVsNewConfigsToUser(previousConfigurations, newConfigurations)
23742375

2375-
templates := &promptui.SelectTemplates{
2376-
Selected: "{{ . | yellow }} ",
2377-
}
2376+
if !store.Get().Silent {
2377+
templates := &promptui.SelectTemplates{
2378+
Selected: "{{ . | yellow }} ",
2379+
}
23782380

2379-
labelStr := fmt.Sprintf("%vDo you wish to proceed?%v", CYAN, COLOR_RESET)
2381+
labelStr := fmt.Sprintf("%vDo you wish to proceed?%v", CYAN, COLOR_RESET)
23802382

2381-
prompt := promptui.Select{
2382-
Label: labelStr,
2383-
Items: []string{"Yes", "No"},
2384-
Templates: templates,
2385-
}
2383+
prompt := promptui.Select{
2384+
Label: labelStr,
2385+
Items: []string{"Yes", "No"},
2386+
Templates: templates,
2387+
}
23862388

2387-
_, result, err := prompt.Run()
2388-
if err != nil {
2389-
return err
2390-
}
2389+
_, result, err := prompt.Run()
2390+
if err != nil {
2391+
return err
2392+
}
23912393

2392-
if result == "No" {
2393-
return fmt.Errorf("installation from existing repo was cancelled")
2394+
if result == "No" {
2395+
return fmt.Errorf("installation from existing repo was cancelled")
2396+
}
23942397
}
23952398

23962399
return nil

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.347/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.348/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.347/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.348/cf-darwin-amd64.tar.gz | tar zx
4040

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/argoproj/argo-events v0.17.1-0.20220327045437-70eaafe9afec
1111
github.com/argoproj/argo-workflows/v3 v3.3.1
1212
github.com/briandowns/spinner v1.18.1
13-
github.com/codefresh-io/go-sdk v0.43.4
13+
github.com/codefresh-io/go-sdk v0.43.5
1414
github.com/fatih/color v1.13.0
1515
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
1616
github.com/go-git/go-billy/v5 v5.3.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h
254254
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
255255
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
256256
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
257-
github.com/codefresh-io/go-sdk v0.43.4 h1:wkC2Wnqfs0mK4kjRNZwb1QO6TR43M7PtAJcyVUkp/Mw=
258-
github.com/codefresh-io/go-sdk v0.43.4/go.mod h1:CcoVmTFWHGkbrSW8LyOGB/vJe5Vzr3iC/pNE2QIBTyg=
257+
github.com/codefresh-io/go-sdk v0.43.5 h1:q45fW8hnwWSOShsXaE5dM/u6gGHf3VSDttLmeEa6Zy0=
258+
github.com/codefresh-io/go-sdk v0.43.5/go.mod h1:CcoVmTFWHGkbrSW8LyOGB/vJe5Vzr3iC/pNE2QIBTyg=
259259
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
260260
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
261261
github.com/container-storage-interface/spec v1.5.0/go.mod h1:8K96oQNkJ7pFcC2R9Z1ynGGBB1I93kcS6PGg3SsOk8s=

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.347
8+
version: 0.0.348
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)