This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 5fc7a9fa [dubboctl] Initial image command field (#571)
5fc7a9fa is described below
commit 5fc7a9fa4edc0357fafa4940dde71869273f6e68
Author: Jian Zhong <[email protected]>
AuthorDate: Sat Feb 1 03:54:54 2025 +0800
[dubboctl] Initial image command field (#571)
---
dubboctl/cmd/image.go | 34 ++++++++++++++++++++++++++++++++++
pkg/art/{atr.go => art.go} | 0
2 files changed, 34 insertions(+)
diff --git a/dubboctl/cmd/image.go b/dubboctl/cmd/image.go
index bfcf8b15..c1b5592a 100644
--- a/dubboctl/cmd/image.go
+++ b/dubboctl/cmd/image.go
@@ -4,12 +4,46 @@ import (
"fmt"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/cli"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/sdk/dubbo"
+ "github.com/ory/viper"
"github.com/spf13/cobra"
"os"
"os/exec"
"path/filepath"
)
+type BuildConfig struct {
+ Build bool
+}
+
+type PushConfig struct {
+ Push bool
+}
+
+type ApplyConfig struct {
+ Apply bool
+}
+
+func newBuildConfig(cmd *cobra.Command) *BuildConfig {
+ bc := &BuildConfig{
+ Build: viper.GetBool("build"),
+ }
+ return bc
+}
+
+func newPushConfig(cmd *cobra.Command) *PushConfig {
+ pc := &PushConfig{
+ Push: viper.GetBool("push"),
+ }
+ return pc
+}
+
+func newApplyConfig(cmd *cobra.Command) *ApplyConfig {
+ ac := &ApplyConfig{
+ Apply: viper.GetBool("apply"),
+ }
+ return ac
+}
+
func ImageCmd(ctx cli.Context, cmd *cobra.Command, clientFactory
ClientFactory) *cobra.Command {
ibc := imageBuildCmd(cmd, clientFactory)
ipc := imagePushCmd(cmd, clientFactory)
diff --git a/pkg/art/atr.go b/pkg/art/art.go
similarity index 100%
rename from pkg/art/atr.go
rename to pkg/art/art.go