Path: blob/main/components/ide/jetbrains/image/create-supervisor-config.js
2499 views
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// @ts-check5const fs = require("fs");67const ideConfigs = [8{9name: "intellij",10displayName: "IntelliJ IDEA",11},12{13name: "goland",14displayName: "GoLand",15},16{17name: "pycharm",18displayName: "PyCharm",19},20{21name: "phpstorm",22displayName: "PhpStorm",23},24{25name: "rubymine",26displayName: "RubyMine",27},28{29name: "webstorm",30displayName: "WebStorm",31},32{33name: "rider",34displayName: "Rider",35},36{37name: "clion",38displayName: "CLion",39},40{41name: "rustrover",42displayName: "RustRover",43},44];4546["stable", "latest"].forEach((qualifier) => {47ideConfigs.forEach((ideConfig) => {48const name = ideConfig.name + (qualifier === "stable" ? "" : "-" + qualifier);49const template = {50name: ideConfig.name,51displayName: ideConfig.displayName,52version: qualifier,53entrypoint: `/ide-desktop/jb-launcher`,54entrypointArgs: ["{DESKTOPIDEPORT}", ideConfig.name, `Open in ${ideConfig.displayName}`],55readinessProbe: {56type: "http",57http: {58path: "/status",59},60},61env: {62JETBRAINS_BACKEND_QUALIFIER: qualifier,63PATH: `/ide-desktop/${name}/bin:$PATH`,64EDITOR: `/ide-desktop/${name}/bin/idea-cli open`,65VISUAL: "$EDITOR",66GP_OPEN_EDITOR: "$EDITOR",67GIT_EDITOR: "$EDITOR --wait",68GP_PREVIEW_BROWSER: `/ide-desktop/${name}/bin/idea-cli preview`,69GP_EXTERNAL_BROWSER: `/ide-desktop/${name}/bin/idea-cli preview`,70},71prebuild: {72args: ["warmup", ideConfig.name],73env: {74JETBRAINS_BACKEND_QUALIFIER: qualifier,75},76},77};78fs.writeFileSync(`supervisor-ide-config_${name}.json`, JSON.stringify(template, null, 2), "utf-8");79});80});818283