-
Notifications
You must be signed in to change notification settings - Fork 25
feat: add deployment mode selection to parameter collection #2135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lionello
wants to merge
7
commits into
main
Choose a base branch
from
lio/pulumi-config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
da86673
feat: add deployment mode selection to parameter collection
lionello 9e50ba4
feat: implement recipe management commands and integrate with deploym…
lionello 7c041c9
seperate Recipe from Mode
lionello 1f4d060
fix mcp
lionello 10f9f4c
Merge branch 'main' into lio/pulumi-config
lionello e49df16
fix: fail up for inactive recipe
lionello 9b7ad3a
pr coments
lionello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,93 @@ | ||
| package command | ||
|
|
||
| import ( | ||
| "errors" | ||
|
|
||
| "github.com/DefangLabs/defang/src/pkg/cli" | ||
| "github.com/spf13/cobra" | ||
| ) | ||
|
|
||
| func makeRecipeCmd() *cobra.Command { | ||
| var recipeCmd = &cobra.Command{ | ||
| Use: "recipe", | ||
| Aliases: []string{"recipes", "modes", "mode"}, | ||
| Short: "Manage workspace recipes (deployment modes)", | ||
| } | ||
| recipeListCmd := makeRecipeListCmd() | ||
| recipeCmd.AddCommand(recipeListCmd) | ||
| recipeShowCmd := makeRecipeShowCmd() | ||
| recipeCmd.AddCommand(recipeShowCmd) | ||
| recipeDeactivateCmd := makeRecipeDeactivateCmd() | ||
| recipeCmd.AddCommand(recipeDeactivateCmd) | ||
| recipeActivateCmd := makeRecipeActivateCmd() | ||
| recipeCmd.AddCommand(recipeActivateCmd) | ||
| return recipeCmd | ||
| } | ||
|
|
||
| func makeRecipeShowCmd() *cobra.Command { | ||
| var recipeShowCmd = &cobra.Command{ | ||
| Use: "show [RECIPE_NAME]", | ||
| Aliases: []string{"get", "describe", "desc"}, | ||
| Annotations: authNeededAlways, | ||
| Args: cobra.ExactArgs(1), | ||
| Short: "Show details of a recipe in the current workspace", | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| ctx := cmd.Context() | ||
| return cli.RecipeShow(ctx, global.Client, args[0]) | ||
| }, | ||
| } | ||
| return recipeShowCmd | ||
| } | ||
|
|
||
| func makeRecipeListCmd() *cobra.Command { | ||
| var recipeListCmd = &cobra.Command{ | ||
| Use: "list", | ||
| Aliases: []string{"ls"}, | ||
| Annotations: authNeededAlways, | ||
| Args: cobra.NoArgs, | ||
| Short: "List recipes in the current workspace", | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| ctx := cmd.Context() | ||
| return cli.RecipeList(ctx, global.Client) | ||
| }, | ||
| } | ||
| return recipeListCmd | ||
| } | ||
|
|
||
| func makeRecipeDeactivateCmd() *cobra.Command { | ||
| var recipeArchiveCmd = &cobra.Command{ | ||
| Use: "deactivate [RECIPE_NAME...]", | ||
| Aliases: []string{"remove", "rm", "delete", "del", "disable", "archive"}, | ||
| Annotations: authNeededAlways, | ||
| Args: cobra.MinimumNArgs(1), | ||
| Short: "Deactivates a recipe in the current workspace", | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| ctx := cmd.Context() | ||
| var errs []error | ||
| for _, name := range args { | ||
| errs = append(errs, cli.RecipeActivate(ctx, global.Client, name, false)) | ||
| } | ||
| return errors.Join(errs...) | ||
| }, | ||
| } | ||
| return recipeArchiveCmd | ||
| } | ||
|
|
||
| func makeRecipeActivateCmd() *cobra.Command { | ||
| var recipeUnarchiveCmd = &cobra.Command{ | ||
| Use: "activate [RECIPE_NAME...]", | ||
| Aliases: []string{"restore", "enable", "undelete", "unarchive"}, | ||
| Annotations: authNeededAlways, | ||
| Args: cobra.MinimumNArgs(1), | ||
| Short: "Activates a recipe in the current workspace", | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| ctx := cmd.Context() | ||
| var errs []error | ||
| for _, name := range args { | ||
| errs = append(errs, cli.RecipeActivate(ctx, global.Client, name, true)) | ||
| } | ||
| return errors.Join(errs...) | ||
| }, | ||
| } | ||
| return recipeUnarchiveCmd | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.