diff --git a/components/gitpod-protocol/data/gitpod-schema.json b/components/gitpod-protocol/data/gitpod-schema.json index d3f2054bb8502e..af20ffae0e7619 100644 --- a/components/gitpod-protocol/data/gitpod-schema.json +++ b/components/gitpod-protocol/data/gitpod-schema.json @@ -275,6 +275,14 @@ "phpstorm": { "$ref": "#/definitions/jetbrainsProduct", "description": "Configure PhpStorm integration" + }, + "rubymine": { + "$ref": "#/definitions/jetbrainsProduct", + "description": "Configure RubyMine integration" + }, + "webstorm": { + "$ref": "#/definitions/jetbrainsProduct", + "description": "Configure WebStorm integration" } } }, diff --git a/components/gitpod-protocol/go/gitpod-config-types.go b/components/gitpod-protocol/go/gitpod-config-types.go index 4bf72162ebad1a..69c88c1037078b 100644 --- a/components/gitpod-protocol/go/gitpod-config-types.go +++ b/components/gitpod-protocol/go/gitpod-config-types.go @@ -115,6 +115,12 @@ type Jetbrains struct { // Configure PyCharm integration Pycharm *JetbrainsProduct `yaml:"pycharm,omitempty"` + + // Configure RubyMine integration + Rubymine *JetbrainsProduct `yaml:"rubymine,omitempty"` + + // Configure WebStorm integration + Webstorm *JetbrainsProduct `yaml:"webstorm,omitempty"` } // JetbrainsProduct @@ -734,6 +740,28 @@ func (strct *Jetbrains) MarshalJSON() ([]byte, error) { buf.Write(tmp) } comma = true + // Marshal the "rubymine" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"rubymine\": ") + if tmp, err := json.Marshal(strct.Rubymine); err != nil { + return nil, err + } else { + buf.Write(tmp) + } + comma = true + // Marshal the "webstorm" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"webstorm\": ") + if tmp, err := json.Marshal(strct.Webstorm); err != nil { + return nil, err + } else { + buf.Write(tmp) + } + comma = true buf.WriteString("}") rv := buf.Bytes() @@ -768,6 +796,14 @@ func (strct *Jetbrains) UnmarshalJSON(b []byte) error { if err := json.Unmarshal([]byte(v), &strct.Pycharm); err != nil { return err } + case "rubymine": + if err := json.Unmarshal([]byte(v), &strct.Rubymine); err != nil { + return err + } + case "webstorm": + if err := json.Unmarshal([]byte(v), &strct.Webstorm); err != nil { + return err + } default: return fmt.Errorf("additional property not allowed: \"" + k + "\"") } diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index 6be293a606ee37..ab0fa2d8f92207 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -795,6 +795,8 @@ export interface JetBrainsConfig { goland?: JetBrainsProductConfig; pycharm?: JetBrainsProductConfig; phpstorm?: JetBrainsProductConfig; + rubymine?: JetBrainsProductConfig; + webstorm?: JetBrainsProductConfig; } export interface JetBrainsProductConfig { prebuilds?: JetBrainsPrebuilds; diff --git a/components/ide/jetbrains/backend-plugin/hot-deploy.sh b/components/ide/jetbrains/backend-plugin/hot-deploy.sh index d3c3cc6b2875a2..838cfce8b61010 100755 --- a/components/ide/jetbrains/backend-plugin/hot-deploy.sh +++ b/components/ide/jetbrains/backend-plugin/hot-deploy.sh @@ -27,12 +27,16 @@ else prop="pluginLatestImage" fi -cf_patch=$(kubectl get cm server-ide-config -o=json | jq '.data."config.json"' |jq -r) +cf_patch=$(kubectl get cm ide-config -o=json | jq '.data."config.json"' |jq -r) cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.intellij.$prop = \"$dev_image\"") cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.goland.$prop = \"$dev_image\"") cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.pycharm.$prop = \"$dev_image\"") cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.phpstorm.$prop = \"$dev_image\"") +cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.rubymine.$prop = \"$dev_image\"") +cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.webstorm.$prop = \"$dev_image\"") cf_patch=$(echo "$cf_patch" |jq tostring) cf_patch="{\"data\": {\"config.json\": $cf_patch}}" -kubectl patch cm server-ide-config --type=merge -p "$cf_patch" +kubectl patch cm ide-config --type=merge -p "$cf_patch" + +kubectl rollout restart deployment ide-service diff --git a/components/server/src/ide-service.ts b/components/server/src/ide-service.ts index 9d9209f8f3b1e2..9c6f2d5822378e 100644 --- a/components/server/src/ide-service.ts +++ b/components/server/src/ide-service.ts @@ -55,6 +55,10 @@ export class IDEService { productCode = "PCP"; } else if (key === "phpstorm") { productCode = "PS"; + } else if (key === "rubymine") { + productCode = "RM"; + } else if (key === "webstorm") { + productCode = "WS"; } const prebuilds = productCode && ws.config.jetbrains[key as keyof JetBrainsConfig]?.prebuilds; if (prebuilds) { diff --git a/test/tests/ide/jetbrains/gateway_test.go b/test/tests/ide/jetbrains/gateway_test.go index 26eb8d32c189eb..1a3b7b3667b8b9 100644 --- a/test/tests/ide/jetbrains/gateway_test.go +++ b/test/tests/ide/jetbrains/gateway_test.go @@ -52,6 +52,8 @@ func init() { ideProjectMap["intellij"] = "https://github.com/gitpod-io/spring-petclinic" ideProjectMap["phpstorm"] = "https://github.com/gitpod-io/template-php-laravel-mysql" ideProjectMap["pycharm"] = "https://github.com/gitpod-io/template-python-django" + ideProjectMap["rubymine"] = "https://github.com/gitpod-io/template-ruby-on-rails-postgres" + ideProjectMap["webstorm"] = "https://github.com/gitpod-io/template-typescript-react" } func GetHttpContent(url string) ([]byte, error) {