generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from Aijeyomah/update-name-flag
remove 'n' from the name flag
- Loading branch information
Showing
6 changed files
with
25 additions
and
15 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
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
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 |
---|---|---|
|
@@ -43,12 +43,12 @@ var generateKanvasSnapshotCmd = &cobra.Command{ | |
Example usage: | ||
helm kanvas-snapshot -n nginx-helm -f https://meshery.github.io/meshery.io/charts/meshery-v0.7.109.tgz -e [email protected] | ||
helm kanvas-snapshot -f https://meshery.github.io/meshery.io/charts/meshery-v0.7.109.tgz -e [email protected] --name nginx-helm | ||
Flags: | ||
-f, --file string URI to Helm chart (required) | ||
-n, --name string (optional name for the Meshery design | ||
-f, --file string URI to Helm chart (required) | ||
-e, --email string email address to notify when snapshot is ready (required) | ||
--name string (optional) name for the Meshery design | ||
-h Help for Helm Kanvas Snapshot plugin`, | ||
|
||
RunE: func(_ *cobra.Command, _ []string) error { | ||
|
@@ -66,9 +66,8 @@ var generateKanvasSnapshotCmd = &cobra.Command{ | |
handleError(errors.ErrCreatingMesheryDesign(err)) | ||
} | ||
|
||
assetLocation := fmt.Sprintf("https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/%s.png", designID) | ||
assetLocation := fmt.Sprintf("https://raw.githubusercontent.com/layer5labs/meshery-extensions-packages/master/action-assets/helm-plugin-assets/%s.png", designID) | ||
|
||
// Generate Snapshot | ||
err = GenerateSnapshot(designID, assetLocation, WorkflowAccessToken) | ||
if err != nil { | ||
handleError(errors.ErrGeneratingSnapshot(err)) | ||
|
@@ -243,14 +242,16 @@ func Main(providerToken, mesheryCloudAPIBaseURL, mesheryAPIBaseURL, workflowAcce | |
MesheryAPIBaseURL = mesheryAPIBaseURL | ||
WorkflowAccessToken = workflowAccessToken | ||
generateKanvasSnapshotCmd.Flags().StringVarP(&chartURI, "file", "f", "", "URI to Helm chart (required)") | ||
generateKanvasSnapshotCmd.Flags().StringVarP(&designName, "design-name", "n", "", "Optional name for the Meshery design") | ||
generateKanvasSnapshotCmd.Flags().StringVar(&designName, "name", "", "Optional name for the Meshery design") | ||
generateKanvasSnapshotCmd.Flags().StringVarP(&email, "email", "e", "", "Optional email to associate with the Meshery design") | ||
|
||
_ = generateKanvasSnapshotCmd.MarkFlagRequired("file") | ||
|
||
if err := generateKanvasSnapshotCmd.Execute(); err != nil { | ||
Log.Error(err) | ||
os.Exit(1) | ||
errors.ErrHTTPPostRequest(err) | ||
generateKanvasSnapshotCmd.SetFlagErrorFunc(func(cmd *cobra.Command, err error) error { | ||
return nil | ||
}) | ||
} | ||
} | ||
|
||
|
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
module github.com/meshery/helm-kanvas-snapshot | ||
|
||
go 1.21.8 | ||
go 1.23 | ||
|
||
toolchain go1.23.4 | ||
|
||
require ( | ||
|