Skip to content

Commit 47ab14a

Browse files
Kube-context-name-fix (#189)
* added the kube context name when --silent * bump
1 parent c8504f4 commit 47ab14a

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
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.170
1+
VERSION=v0.0.171
22

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

cmd/commands/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ func promptSummaryToUser(ctx context.Context, finalParameters map[string]string,
268268

269269
func getKubeContextNameFromUserSelect(cmd *cobra.Command, kubeContextName *string) error {
270270
if store.Get().Silent {
271+
*kubeContextName, _ = cmd.Flags().GetString("context")
271272
return nil
272273
}
273274

cmd/commands/runtime.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,12 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
337337

338338
log.G(ctx).WithField("version", rt.Spec.Version).Infof("Installing runtime '%s'", opts.RuntimeName)
339339
err = apcmd.RunRepoBootstrap(ctx, &apcmd.RepoBootstrapOptions{
340-
AppSpecifier: rt.Spec.FullSpecifier(),
341-
Namespace: opts.RuntimeName,
342-
KubeFactory: opts.KubeFactory,
343-
CloneOptions: opts.InsCloneOpts,
344-
Insecure: opts.Insecure,
340+
AppSpecifier: rt.Spec.FullSpecifier(),
341+
Namespace: opts.RuntimeName,
342+
KubeFactory: opts.KubeFactory,
343+
CloneOptions: opts.InsCloneOpts,
344+
Insecure: opts.Insecure,
345+
KubeContextName: opts.kubeContext,
345346
ArgoCDLabels: map[string]string{
346347
store.Get().LabelKeyCFType: store.Get().CFComponentType,
347348
},

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.170/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.171/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.170/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.171/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.0
8-
version: 0.0.170
8+
version: 0.0.171
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)