forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize all CLIs into a separate dir. Add stubs for executor and a…
…piserver
- Loading branch information
Showing
16 changed files
with
134 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM debian:9.1 | ||
|
||
COPY dist/argo-executor /bin/ | ||
|
||
ENTRYPOINT [ "/bin/argo-executor" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package apiserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package schema contains the database schema for Argo backend | ||
package schema |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/argoproj/argo/util/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
const ( | ||
// CLIName is the name of the CLI | ||
CLIName = "argo-apiserver" | ||
) | ||
|
||
// RootCmd is the root level command | ||
var RootCmd = &cobra.Command{ | ||
Use: CLIName, | ||
Short: "Argo API Server", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
cmd.HelpFunc()(cmd, args) | ||
}, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(cmd.NewVersionCmd(CLIName)) | ||
} | ||
|
||
func main() { | ||
if err := RootCmd.Execute(); err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/argoproj/argo/util/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
const ( | ||
// CLIName is the name of the CLI | ||
CLIName = "argo-executor" | ||
) | ||
|
||
// RootCmd is the root level command | ||
var RootCmd = &cobra.Command{ | ||
Use: CLIName, | ||
Short: "Argo Container Executor", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
cmd.HelpFunc()(cmd, args) | ||
}, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(cmd.NewVersionCmd(CLIName)) | ||
} | ||
|
||
func main() { | ||
if err := RootCmd.Execute(); err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package executor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Package cmd provides functionally common to various argo CLIs | ||
|
||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/argoproj/argo" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// NewVersionCmd returns a new `version` command to be used as a sub-command to root | ||
func NewVersionCmd(cliName string) *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "version", | ||
Short: fmt.Sprintf("Print version information"), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
fmt.Printf("%s version %s\n", cliName, argo.FullVersion) | ||
}, | ||
} | ||
} |
File renamed without changes.