From 0229fdc3b6604ea0ac8d89c1ab08eee08ea32891 Mon Sep 17 00:00:00 2001 From: Victor Nogueira Date: Wed, 22 Jun 2022 16:22:36 +0000 Subject: [PATCH] When using the Latest Release of JetBrains IDEs, if the workspace has tasks defined on .gitpod.yml, the IDE will start with one terminal opened for each task --- .gitpod.yml | 2 +- .../ide/jetbrains/backend-plugin/.gitignore | 1 + .../ide/jetbrains/backend-plugin/BUILD.yaml | 27 ++- .../jetbrains/backend-plugin/build.gradle.kts | 24 ++- .../backend-plugin/gradle-latest.properties | 9 + .../backend-plugin/gradle-stable.properties | 9 + .../backend-plugin/gradle.properties | 12 +- .../remote/latest/GitpodTerminalService.kt | 199 ++++++++++++++++++ .../{ => stable}/GitpodTerminalService.kt | 4 +- .../resources-latest/META-INF/extensions.xml | 10 + .../resources-stable/META-INF/extensions.xml | 10 + .../src/main/resources/META-INF/plugin.xml | 4 +- components/ide/jetbrains/image/BUILD.yaml | 16 +- .../ide/jetbrains/image/leeway.Dockerfile | 3 +- 14 files changed, 301 insertions(+), 29 deletions(-) create mode 100644 components/ide/jetbrains/backend-plugin/gradle-latest.properties create mode 100644 components/ide/jetbrains/backend-plugin/gradle-stable.properties create mode 100644 components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/latest/GitpodTerminalService.kt rename components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/{ => stable}/GitpodTerminalService.kt (96%) create mode 100644 components/ide/jetbrains/backend-plugin/src/main/resources-latest/META-INF/extensions.xml create mode 100644 components/ide/jetbrains/backend-plugin/src/main/resources-stable/META-INF/extensions.xml diff --git a/.gitpod.yml b/.gitpod.yml index efca58c07a68cc..a5866cc7694fde 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -46,7 +46,7 @@ tasks: read -r -p "Press enter to continue Java gradle task" fi leeway exec --package components/supervisor-api/java:lib --package components/gitpod-protocol/java:lib -- ./gradlew --build-cache build - leeway exec --package components/ide/jetbrains/backend-plugin:plugin --package components/ide/jetbrains/gateway-plugin:publish --parallel -- ./gradlew --build-cache buildPlugin + leeway exec --package components/ide/jetbrains/backend-plugin:plugin-latest --package components/ide/jetbrains/gateway-plugin:publish --parallel -- ./gradlew --build-cache buildPlugin - name: TypeScript before: scripts/branch-namespace.sh init: yarn --network-timeout 100000 && yarn build diff --git a/components/ide/jetbrains/backend-plugin/.gitignore b/components/ide/jetbrains/backend-plugin/.gitignore index 1ba96ae392cf36..9fbea8abb7bbb9 100644 --- a/components/ide/jetbrains/backend-plugin/.gitignore +++ b/components/ide/jetbrains/backend-plugin/.gitignore @@ -3,3 +3,4 @@ .vscode bin build +gradle-local.properties diff --git a/components/ide/jetbrains/backend-plugin/BUILD.yaml b/components/ide/jetbrains/backend-plugin/BUILD.yaml index de621855869f41..b9d783401e8616 100644 --- a/components/ide/jetbrains/backend-plugin/BUILD.yaml +++ b/components/ide/jetbrains/backend-plugin/BUILD.yaml @@ -1,5 +1,5 @@ packages: - - name: plugin + - name: plugin-stable type: generic deps: - components/supervisor-api/java:lib @@ -8,11 +8,32 @@ packages: - "**/*.kt" - "build.gradle.kts" - "gradle.properties" + - "gradle-stable.properties" - "gradle/wrapper/*" - "gradlew" - "settings.gradle.kts" - "src/main/resources/*" + - "src/main/resources-stable/*" config: commands: - - ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "runPluginVerifier"] - - ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "buildPlugin"] + - ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "-PenvironmentName=stable", "runPluginVerifier"] + - ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "-PenvironmentName=stable", "buildPlugin"] + - name: plugin-latest + type: generic + deps: + - components/supervisor-api/java:lib + - components/gitpod-protocol/java:lib + srcs: + - "**/*.kt" + - "build.gradle.kts" + - "gradle.properties" + - "gradle-latest.properties" + - "gradle/wrapper/*" + - "gradlew" + - "settings.gradle.kts" + - "src/main/resources/*" + - "src/main/resources-latest/*" + config: + commands: + - ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "-PenvironmentName=latest", "runPluginVerifier"] + - ["./gradlew", "-PsupervisorApiProjectPath=components-supervisor-api-java--lib/", "-PgitpodProtocolProjectPath=components-gitpod-protocol-java--lib/", "-PenvironmentName=latest", "buildPlugin"] diff --git a/components/ide/jetbrains/backend-plugin/build.gradle.kts b/components/ide/jetbrains/backend-plugin/build.gradle.kts index 3c465fb6c1e1f8..3769309c2c9ba2 100644 --- a/components/ide/jetbrains/backend-plugin/build.gradle.kts +++ b/components/ide/jetbrains/backend-plugin/build.gradle.kts @@ -10,19 +10,37 @@ fun properties(key: String) = project.findProperty(key).toString() plugins { // Java support id("java") - // Kotlin support - id("org.jetbrains.kotlin.jvm") version "1.5.10" + // Kotlin support - check the latest version at https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm + id("org.jetbrains.kotlin.jvm") version "1.7.0" // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin - id("org.jetbrains.intellij") version "1.0" + id("org.jetbrains.intellij") version "1.6.0" // detekt linter - read more: https://detekt.github.io/detekt/gradle.html id("io.gitlab.arturbosch.detekt") version "1.17.1" // ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle id("org.jlleitschuh.gradle.ktlint") version "10.0.0" + // Gradle Properties Plugin - read more: https://github.com/stevesaliman/gradle-properties-plugin + id("net.saliman.properties") version "1.5.2" } group = properties("pluginGroup") version = properties("version") +val environmentName = properties("environmentName") + +project(":") { + kotlin { + var excludedPackage = "stable" + if (environmentName == excludedPackage) excludedPackage = "latest" + sourceSets["main"].kotlin.exclude("io/gitpod/jetbrains/remote/${excludedPackage}/**") + } + + sourceSets { + main { + resources.srcDirs("src/main/resources-${environmentName}") + } + } +} + // Configure project's dependencies repositories { mavenCentral() diff --git a/components/ide/jetbrains/backend-plugin/gradle-latest.properties b/components/ide/jetbrains/backend-plugin/gradle-latest.properties new file mode 100644 index 00000000000000..bb2590085d2fd0 --- /dev/null +++ b/components/ide/jetbrains/backend-plugin/gradle-latest.properties @@ -0,0 +1,9 @@ +# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html +# for insight into build numbers and IntelliJ Platform versions. +pluginSinceBuild=222 +pluginUntilBuild=222.* +# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl +# See https://jb.gg/intellij-platform-builds-list for available build versions. +pluginVerifierIdeVersions=2022.2 +# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots +platformVersion=222-EAP-SNAPSHOT diff --git a/components/ide/jetbrains/backend-plugin/gradle-stable.properties b/components/ide/jetbrains/backend-plugin/gradle-stable.properties new file mode 100644 index 00000000000000..7cb9c111870a88 --- /dev/null +++ b/components/ide/jetbrains/backend-plugin/gradle-stable.properties @@ -0,0 +1,9 @@ +# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html +# for insight into build numbers and IntelliJ Platform versions. +pluginSinceBuild=221 +pluginUntilBuild=221.* +# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl +# See https://jb.gg/intellij-platform-builds-list for available build versions. +pluginVerifierIdeVersions=2022.1 +# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots +platformVersion=221-EAP-SNAPSHOT diff --git a/components/ide/jetbrains/backend-plugin/gradle.properties b/components/ide/jetbrains/backend-plugin/gradle.properties index 807fa6476d756a..2cbce2c7b77a77 100644 --- a/components/ide/jetbrains/backend-plugin/gradle.properties +++ b/components/ide/jetbrains/backend-plugin/gradle.properties @@ -1,18 +1,12 @@ version=0.0.1 +# Supported environments: stable, latest (via https://github.com/stevesaliman/gradle-properties-plugin) +environmentName=latest # IntelliJ Platform Artifacts Repositories # -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html pluginGroup=io.gitpod.jetbrains pluginName=gitpod-remote -# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -# for insight into build numbers and IntelliJ Platform versions. -pluginSinceBuild=213 -pluginUntilBuild=221.* -# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl -# See https://jb.gg/intellij-platform-builds-list for available build versions. -pluginVerifierIdeVersions=2021.3, 2022.1 -# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type platformType=IU -platformVersion=221-EAP-SNAPSHOT platformDownloadSources=true # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 diff --git a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/latest/GitpodTerminalService.kt b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/latest/GitpodTerminalService.kt new file mode 100644 index 00000000000000..4d7346bf7fa21a --- /dev/null +++ b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/latest/GitpodTerminalService.kt @@ -0,0 +1,199 @@ +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License-AGPL.txt in the project root for license information. + +package io.gitpod.jetbrains.remote.latest + +import com.intellij.openapi.Disposable +import com.intellij.openapi.client.ClientProjectSession +import com.intellij.openapi.diagnostic.thisLogger +import com.intellij.remoteDev.util.onTerminationOrNow +import com.intellij.util.application +import com.jetbrains.rd.util.lifetime.Lifetime +import com.jetbrains.rdserver.terminal.BackendTerminalManager +import io.gitpod.jetbrains.remote.GitpodManager +import io.gitpod.supervisor.api.Status +import io.gitpod.supervisor.api.StatusServiceGrpc +import io.gitpod.supervisor.api.TerminalOuterClass +import io.gitpod.supervisor.api.TerminalServiceGrpc +import io.grpc.stub.ClientCallStreamObserver +import io.grpc.stub.ClientResponseObserver +import org.jetbrains.plugins.terminal.ShellTerminalWidget +import org.jetbrains.plugins.terminal.TerminalView +import java.util.* +import java.util.concurrent.CompletableFuture +import java.util.concurrent.TimeUnit + +@Suppress("UnstableApiUsage") +class GitpodTerminalService(session: ClientProjectSession) : Disposable { + private companion object { + /** Indicates if this service is already running, because we shouldn't run it more than once. */ + var isRunning = false + } + + private val lifetime = Lifetime.Eternal.createNested() + private val terminalView = TerminalView.getInstance(session.project) + private val backendTerminalManager = BackendTerminalManager.getInstance(session.project) + private val terminalServiceFutureStub = TerminalServiceGrpc.newFutureStub(GitpodManager.supervisorChannel) + private val statusServiceStub = StatusServiceGrpc.newStub(GitpodManager.supervisorChannel) + + override fun dispose() { + lifetime.terminate() + } + + init { + run() + } + + private fun run() { + if (application.isHeadlessEnvironment || isRunning) return + + isRunning = true + + val task = application.executeOnPooledThread { + val terminals = getSupervisorTerminalsList() + val tasks = getSupervisorTasksList() + + application.invokeLater { + createTerminalsAttachedToTasks(terminals, tasks) + } + } + + lifetime.onTerminationOrNow { + task.cancel(true) + } + } + + private fun createSharedTerminalAndExecuteCommand(title: String, command: String) { + val registeredTerminals = terminalView.widgets.toMutableList() + + backendTerminalManager.createNewSharedTerminal(UUID.randomUUID().toString(), title) + + for (widget in terminalView.widgets) { + if (!registeredTerminals.contains(widget)) { + widget.terminalTitle.change { + applicationTitle = title + } + (widget as ShellTerminalWidget).executeCommand(command) + } + } + } + + private fun createTerminalsAttachedToTasks( + terminals: List, + tasks: List + ) { + if (tasks.isEmpty()) return + + val aliasToTerminalMap: MutableMap = mutableMapOf() + + for (terminal in terminals) { + val terminalAlias = terminal.alias + aliasToTerminalMap[terminalAlias] = terminal + } + + for (task in tasks) { + val terminalAlias = task.terminal + val terminal = aliasToTerminalMap[terminalAlias] + + if (terminal != null) { + createAttachedSharedTerminal(terminal) + } + } + } + + private tailrec fun getSupervisorTasksList(): List { + var tasksList: List? = null + + try { + val completableFuture = CompletableFuture>() + + val taskStatusRequest = Status.TasksStatusRequest.newBuilder().setObserve(true).build() + + val taskStatusResponseObserver = object : + ClientResponseObserver { + override fun beforeStart(request: ClientCallStreamObserver) { + lifetime.onTerminationOrNow { + request.cancel(null, null) + } + } + + override fun onNext(response: Status.TasksStatusResponse) { + for (task in response.tasksList) { + if (task.state === Status.TaskState.opening) { + return + } + } + completableFuture.complete(response.tasksList) + } + + override fun onCompleted() {} + + override fun onError(throwable: Throwable) { + completableFuture.completeExceptionally(throwable) + } + } + + statusServiceStub.tasksStatus(taskStatusRequest, taskStatusResponseObserver) + + tasksList = completableFuture.get() + } catch (throwable: Throwable) { + if (throwable is InterruptedException) { + throw throwable + } + + thisLogger().error( + "Got an error while trying to get tasks list from Supervisor. Trying again in on second.", + throwable + ) + } + + return if (tasksList != null) { + tasksList + } else { + TimeUnit.SECONDS.sleep(1) + getSupervisorTasksList() + } + } + + private tailrec fun getSupervisorTerminalsList(): List { + var terminalsList: List? = null + + try { + val listTerminalsRequest = TerminalOuterClass.ListTerminalsRequest.newBuilder().build() + + val listTerminalsResponseFuture = terminalServiceFutureStub.list(listTerminalsRequest) + + lifetime.onTerminationOrNow { + listTerminalsResponseFuture.cancel(true) + } + + val listTerminalsResponse = listTerminalsResponseFuture.get() + + terminalsList = listTerminalsResponse.terminalsList + } catch (throwable: Throwable) { + if (throwable is InterruptedException) { + throw throwable + } + + thisLogger().error( + "Got an error while trying to get terminals list from Supervisor. Trying again in on second.", + throwable + ) + } + + return if (terminalsList != null) { + terminalsList + } else { + TimeUnit.SECONDS.sleep(1) + getSupervisorTerminalsList() + } + } + + private fun createAttachedSharedTerminal(supervisorTerminal: TerminalOuterClass.Terminal) { + createSharedTerminalAndExecuteCommand( + supervisorTerminal.title, + "gp tasks attach ${supervisorTerminal.alias}" + ) + } +} diff --git a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodTerminalService.kt b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/stable/GitpodTerminalService.kt similarity index 96% rename from components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodTerminalService.kt rename to components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/stable/GitpodTerminalService.kt index c6330b99a80111..7ad70c8800da37 100644 --- a/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodTerminalService.kt +++ b/components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/stable/GitpodTerminalService.kt @@ -2,7 +2,7 @@ // Licensed under the GNU Affero General Public License (AGPL). // See License-AGPL.txt in the project root for license information. -package io.gitpod.jetbrains.remote +package io.gitpod.jetbrains.remote.stable import com.intellij.openapi.Disposable import com.intellij.openapi.application.runInEdt @@ -24,7 +24,7 @@ import org.jetbrains.plugins.terminal.TerminalToolWindowFactory import org.jetbrains.plugins.terminal.TerminalView import java.util.concurrent.CompletableFuture -@Suppress("UnstableApiUsage", "EXPERIMENTAL_IS_NOT_ENABLED", "OPT_IN_IS_NOT_ENABLED") +@Suppress("UnstableApiUsage", "EXPERIMENTAL_IS_NOT_ENABLED") @OptIn(DelicateCoroutinesApi::class) class GitpodTerminalService(private val project: Project) : Disposable { private val lifetime = Lifetime.Eternal.createNested() diff --git a/components/ide/jetbrains/backend-plugin/src/main/resources-latest/META-INF/extensions.xml b/components/ide/jetbrains/backend-plugin/src/main/resources-latest/META-INF/extensions.xml new file mode 100644 index 00000000000000..d705f363926944 --- /dev/null +++ b/components/ide/jetbrains/backend-plugin/src/main/resources-latest/META-INF/extensions.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/components/ide/jetbrains/backend-plugin/src/main/resources-stable/META-INF/extensions.xml b/components/ide/jetbrains/backend-plugin/src/main/resources-stable/META-INF/extensions.xml new file mode 100644 index 00000000000000..5961b901e13e92 --- /dev/null +++ b/components/ide/jetbrains/backend-plugin/src/main/resources-stable/META-INF/extensions.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/plugin.xml b/components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/plugin.xml index 96cf8c00b37a58..ca19490a92ab7b 100644 --- a/components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/plugin.xml +++ b/components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/plugin.xml @@ -3,8 +3,9 @@ Licensed under the GNU Affero General Public License (AGPL). See License-AGPL.txt in the project root for license information. --> + + - io.gitpod.jetbrains.remote Gitpod Remote Gitpod @@ -26,7 +27,6 @@ - diff --git a/components/ide/jetbrains/image/BUILD.yaml b/components/ide/jetbrains/image/BUILD.yaml index 709b6c22e729b5..c6739793a193b8 100644 --- a/components/ide/jetbrains/image/BUILD.yaml +++ b/components/ide/jetbrains/image/BUILD.yaml @@ -18,7 +18,7 @@ packages: - "startup.sh" - "supervisor-ide-config_intellij.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-stable - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -40,7 +40,7 @@ packages: - "startup.sh" - "supervisor-ide-config_intellij.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-latest - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -62,7 +62,7 @@ packages: - "startup.sh" - "supervisor-ide-config_goland.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-stable - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -84,7 +84,7 @@ packages: - "startup.sh" - "supervisor-ide-config_goland.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-latest - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -106,7 +106,7 @@ packages: - "startup.sh" - "supervisor-ide-config_pycharm.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-stable - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -128,7 +128,7 @@ packages: - "startup.sh" - "supervisor-ide-config_pycharm.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-latest - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -150,7 +150,7 @@ packages: - "startup.sh" - "supervisor-ide-config_phpstorm.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-stable - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: @@ -172,7 +172,7 @@ packages: - "startup.sh" - "supervisor-ide-config_phpstorm.json" deps: - - components/ide/jetbrains/backend-plugin:plugin + - components/ide/jetbrains/backend-plugin:plugin-latest - components/ide/jetbrains/image/status:app - components/ide/jetbrains/cli:app argdeps: diff --git a/components/ide/jetbrains/image/leeway.Dockerfile b/components/ide/jetbrains/image/leeway.Dockerfile index 78fb8d6b9c9a27..0991507d60cda0 100644 --- a/components/ide/jetbrains/image/leeway.Dockerfile +++ b/components/ide/jetbrains/image/leeway.Dockerfile @@ -4,10 +4,11 @@ FROM alpine:3.16 as download ARG JETBRAINS_BACKEND_URL +ARG JETBRAINS_BACKEND_QUALIFIER WORKDIR /workdir RUN apk add --no-cache --upgrade curl gzip tar unzip RUN curl -sSLo backend.tar.gz "$JETBRAINS_BACKEND_URL" && tar -xf backend.tar.gz --strip-components=1 && rm backend.tar.gz -COPY --chown=33333:33333 components-ide-jetbrains-backend-plugin--plugin/build/distributions/gitpod-remote-0.0.1.zip /workdir +COPY --chown=33333:33333 components-ide-jetbrains-backend-plugin--plugin-${JETBRAINS_BACKEND_QUALIFIER}/build/distributions/gitpod-remote-0.0.1.zip /workdir RUN unzip gitpod-remote-0.0.1.zip -d plugins/ && rm gitpod-remote-0.0.1.zip # enable shared indexes by default RUN printf '\nshared.indexes.download.auto.consent=true' >> "/workdir/bin/idea.properties"