Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package jenkins-x-cli for openSUSE:Factory 
checked in at 2026-04-30 20:29:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jenkins-x-cli (Old)
 and      /work/SRC/openSUSE:Factory/.jenkins-x-cli.new.30200 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jenkins-x-cli"

Thu Apr 30 20:29:18 2026 rev:46 rq:1350138 version:3.17.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/jenkins-x-cli/jenkins-x-cli.changes      
2026-04-18 21:37:11.063567770 +0200
+++ /work/SRC/openSUSE:Factory/.jenkins-x-cli.new.30200/jenkins-x-cli.changes   
2026-04-30 20:29:25.776431078 +0200
@@ -1,0 +2,7 @@
+Thu Apr 30 05:22:21 UTC 2026 - Johannes Kastl 
<[email protected]>
+
+- Update to version 3.17.0:
+  * New Features
+    - feat: support switching to previous namespace
+
+-------------------------------------------------------------------

Old:
----
  jenkins-x-cli-3.16.71.obscpio

New:
----
  jenkins-x-cli-3.17.0.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jenkins-x-cli.spec ++++++
--- /var/tmp/diff_new_pack.JSDfhN/_old  2026-04-30 20:29:27.604506091 +0200
+++ /var/tmp/diff_new_pack.JSDfhN/_new  2026-04-30 20:29:27.608506255 +0200
@@ -19,7 +19,7 @@
 %define executable_name jx
 
 Name:           jenkins-x-cli
-Version:        3.16.71
+Version:        3.17.0
 Release:        0
 Summary:        CLI for Jenkins X
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.JSDfhN/_old  2026-04-30 20:29:27.644507733 +0200
+++ /var/tmp/diff_new_pack.JSDfhN/_new  2026-04-30 20:29:27.652508060 +0200
@@ -3,7 +3,7 @@
     <param name="url">https://github.com/jenkins-x/jx</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v3.16.71</param>
+    <param name="revision">v3.17.0</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.JSDfhN/_old  2026-04-30 20:29:27.680509210 +0200
+++ /var/tmp/diff_new_pack.JSDfhN/_new  2026-04-30 20:29:27.684509374 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/jenkins-x/jx</param>
-              <param 
name="changesrevision">00a3f20631f7fc2c749c01b451095fa1bca098e8</param></service></servicedata>
+              <param 
name="changesrevision">4cedd539fade460c186a5b482782e4392d1c0b1a</param></service></servicedata>
 (No newline at EOF)
 

++++++ jenkins-x-cli-3.16.71.obscpio -> jenkins-x-cli-3.17.0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jenkins-x-cli-3.16.71/pkg/cmd/namespace/namespace.go 
new/jenkins-x-cli-3.17.0/pkg/cmd/namespace/namespace.go
--- old/jenkins-x-cli-3.16.71/pkg/cmd/namespace/namespace.go    2026-04-15 
09:07:41.000000000 +0200
+++ new/jenkins-x-cli-3.17.0/pkg/cmd/namespace/namespace.go     2026-04-29 
14:19:12.000000000 +0200
@@ -17,6 +17,8 @@
        "github.com/jenkins-x/jx-kube-client/v3/pkg/kubeclient"
        "github.com/jenkins-x/jx-logging/v3/pkg/log"
        "github.com/spf13/cobra"
+       "k8s.io/apimachinery/pkg/runtime"
+       "k8s.io/apimachinery/pkg/util/json"
        "k8s.io/client-go/rest"
 
        "github.com/jenkins-x/jx-helpers/v3/pkg/kube"
@@ -46,7 +48,8 @@
 }
 
 var (
-       cmdLong = templates.LongDesc(`
+       configExtension = "previous-ns.jayex.io"
+       cmdLong         = templates.LongDesc(`
                Displays or changes the current namespace.`)
        cmdExample = templates.Examples(`
                # view the current namespace
@@ -69,6 +72,9 @@
 
                # interactively select the Environment to switch to
                jx ns --pick
+
+               # change to the previously selected namespace
+               jx ns -
 `)
 
        info = termcolor.ColorInfo
@@ -151,6 +157,18 @@
                ns = namespace(o)
        }
 
+       if ns == "-" {
+               ctx := kube.CurrentContext(cfg)
+               if ext, ok := 
ctx.Extensions[configExtension].(*runtime.Unknown); ok {
+                       err = json.Unmarshal(ext.Raw, &ns)
+                       if err != nil {
+                               log.Logger().WithError(err).Warnf("can't 
interpret previous namespace")
+                       }
+               }
+               if ns == "" {
+                       log.Logger().Warnf("no previous namespace was set")
+               }
+       }
        if ns == "" && !o.BatchMode {
                ns, err = pickNamespace(o, client, currentNS)
                if err != nil {
@@ -271,6 +289,16 @@
                name := "pod"
                config.Contexts[name] = ctx
                config.CurrentContext = name
+       } else {
+               jsonNs, err := json.Marshal(ctx.Namespace)
+               if err != nil {
+                       log.Logger().WithError(err).Warnf("fail to store 
previous namespace in %s", pathOptions.GetDefaultFilename())
+               } else {
+                       ctx.Extensions[configExtension] = &runtime.Unknown{
+                               Raw:         jsonNs,
+                               ContentType: runtime.ContentTypeJSON,
+                       }
+               }
        }
 
        if ctx.Namespace == ns {

++++++ jenkins-x-cli.obsinfo ++++++
--- /var/tmp/diff_new_pack.JSDfhN/_old  2026-04-30 20:29:28.036523818 +0200
+++ /var/tmp/diff_new_pack.JSDfhN/_new  2026-04-30 20:29:28.040523982 +0200
@@ -1,5 +1,5 @@
 name: jenkins-x-cli
-version: 3.16.71
-mtime: 1776236861
-commit: 00a3f20631f7fc2c749c01b451095fa1bca098e8
+version: 3.17.0
+mtime: 1777465152
+commit: 4cedd539fade460c186a5b482782e4392d1c0b1a
 

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/jenkins-x-cli/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.jenkins-x-cli.new.30200/vendor.tar.gz differ: char 
15, line 1

Reply via email to