Skip to content

Commit 2be61a7

Browse files
committed
πŸ“¦ NEW: Install Custom Jps
1 parent 8056f05 commit 2be61a7

25 files changed

+101
-23
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package cmd
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/spf13/cobra"
7+
)
8+
9+
func init() {
10+
rootCmd.AddCommand(installCmd)
11+
installCmd.Flags().String("jps", "", "A JPS manifest is required")
12+
installCmd.Flags().String("envName", "", "An environment name is required")
13+
installCmd.Flags().String("envGroups", "", "An environment groups is optional")
14+
installCmd.MarkFlagRequired("jps")
15+
installCmd.MarkFlagRequired("envName")
16+
17+
rootCmd.AddGroup(&cobra.Group{ID: "Marketplace/JPS", Title: "Marketplace/JPS"})
18+
}
19+
20+
var installCmd = &cobra.Command{
21+
Use: "install",
22+
Short: "Installs a custom JPS manifest.",
23+
Long: "Installs a custom JPS manifest.",
24+
GroupID: "Marketplace/JPS",
25+
Example: `GoJelastic install --token=token --url=url --jps=jps --envName=envName --envGroups=envGroups`,
26+
Run: func(cmd *cobra.Command, args []string) {
27+
token, _ := cmd.Flags().GetString("token")
28+
url, _ := cmd.Flags().GetString("url")
29+
jps, _ := cmd.Flags().GetString("jps")
30+
envName, _ := cmd.Flags().GetString("envName")
31+
envGroups, _ := cmd.Flags().GetString("envGroups")
32+
33+
finalUrl := url + "/marketplace/jps/rest/install" + "?session=" + token + "&envName=" + envName + "&jps=" + jps + "&envGroups=" + envGroups
34+
35+
response := makeRequest(finalUrl, "POST", "")
36+
fmt.Println(response)
37+
},
38+
}

β€Ždocs/documentation/GoJelastic.mdβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ An Alternative and not official CLI for Jelastic
3131
* [GoJelastic getRegions](GoJelastic_getRegions.md) - Gets available regions for the user
3232
* [GoJelastic getRules](GoJelastic_getRules.md) - Provides information about firewall rules for the environment
3333
* [GoJelastic getUserInfo](GoJelastic_getUserInfo.md) - Gets information about the user.
34+
* [GoJelastic install](GoJelastic_install.md) - Installs a custom JPS manifest.
3435
* [GoJelastic recoverPassword](GoJelastic_recoverPassword.md) - Sends an email with the link to reset the account password
3536
* [GoJelastic redeployContainerById](GoJelastic_redeployContainerById.md) - Redeploy a container by id
3637
* [GoJelastic startEnv](GoJelastic_startEnv.md) - Start one environment
3738
* [GoJelastic stopEnv](GoJelastic_stopEnv.md) - Stop one environment
3839

39-
###### Auto generated by spf13/cobra on 30-Dec-2022
40+
###### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_completion.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ See each sub-command's help for details on how to use the generated script.
2929
* [GoJelastic completion powershell](GoJelastic_completion_powershell.md) - Generate the autocompletion script for powershell
3030
* [GoJelastic completion zsh](GoJelastic_completion_zsh.md) - Generate the autocompletion script for zsh
3131

32-
##### Auto generated by spf13/cobra on 30-Dec-2022
32+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_completion_bash.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ GoJelastic completion bash
4848

4949
* [GoJelastic completion](GoJelastic_completion.md) - Generate the autocompletion script for the specified shell
5050

51-
##### Auto generated by spf13/cobra on 30-Dec-2022
51+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_completion_fish.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ GoJelastic completion fish [flags]
3939

4040
* [GoJelastic completion](GoJelastic_completion.md) - Generate the autocompletion script for the specified shell
4141

42-
##### Auto generated by spf13/cobra on 30-Dec-2022
42+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_completion_powershell.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ GoJelastic completion powershell [flags]
3636

3737
* [GoJelastic completion](GoJelastic_completion.md) - Generate the autocompletion script for the specified shell
3838

39-
##### Auto generated by spf13/cobra on 30-Dec-2022
39+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_completion_zsh.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ GoJelastic completion zsh [flags]
5050

5151
* [GoJelastic completion](GoJelastic_completion.md) - Generate the autocompletion script for the specified shell
5252

53-
##### Auto generated by spf13/cobra on 30-Dec-2022
53+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_configure.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ GoJelastic configure --token=token --url=url
2828

2929
* [GoJelastic](GoJelastic.md) - An Alternative CLI for Jelastic
3030

31-
##### Auto generated by spf13/cobra on 30-Dec-2022
31+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_documentation.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ GoJelastic documentation
3333

3434
* [GoJelastic](GoJelastic.md) - An Alternative CLI for Jelastic
3535

36-
##### Auto generated by spf13/cobra on 30-Dec-2022
36+
##### Auto generated by spf13/cobra on 16-Jan-2023

β€Ždocs/documentation/GoJelastic_getAccount.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ GoJelastic billing/account getAccount --token=token --url=url --appid=appid
3434

3535
* [GoJelastic](GoJelastic.md) - An Alternative CLI for Jelastic
3636

37-
##### Auto generated by spf13/cobra on 30-Dec-2022
37+
##### Auto generated by spf13/cobra on 16-Jan-2023

0 commit comments

Comments
Β (0)