Skip to content

Commit 3c7eb41

Browse files
committed
[debug] IDE
1 parent 64111e0 commit 3c7eb41

File tree

7 files changed

+484
-68
lines changed

7 files changed

+484
-68
lines changed

components/ide/jetbrains/image/BUILD.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ packages:
1313
srcs:
1414
- "startup.sh"
1515
- "supervisor-ide-config_intellij.json"
16-
- "status/go.mod"
17-
- "status/main.go"
1816
deps:
1917
- components/ide/jetbrains/backend-plugin:plugin
18+
- components/ide/jetbrains/image/status:app
2019
argdeps:
2120
- imageRepoBase
2221
config:
@@ -34,10 +33,9 @@ packages:
3433
srcs:
3534
- "startup.sh"
3635
- "supervisor-ide-config_goland.json"
37-
- "status/go.mod"
38-
- "status/main.go"
3936
deps:
4037
- components/ide/jetbrains/backend-plugin:plugin
38+
- components/ide/jetbrains/image/status:app
4139
argdeps:
4240
- imageRepoBase
4341
config:
@@ -55,10 +53,9 @@ packages:
5553
srcs:
5654
- "startup.sh"
5755
- "supervisor-ide-config_pycharm.json"
58-
- "status/go.mod"
59-
- "status/main.go"
6056
deps:
6157
- components/ide/jetbrains/backend-plugin:plugin
58+
- components/ide/jetbrains/image/status:app
6259
argdeps:
6360
- imageRepoBase
6461
config:
@@ -76,10 +73,9 @@ packages:
7673
srcs:
7774
- "startup.sh"
7875
- "supervisor-ide-config_phpstorm.json"
79-
- "status/go.mod"
80-
- "status/main.go"
8176
deps:
8277
- components/ide/jetbrains/backend-plugin:plugin
78+
- components/ide/jetbrains/image/status:app
8379
argdeps:
8480
- imageRepoBase
8581
config:

components/ide/jetbrains/image/leeway.Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
# Licensed under the GNU Affero General Public License (AGPL).
33
# See License-AGPL.txt in the project root for license information.
44

5-
FROM golang:1.17 AS build
6-
WORKDIR /app
7-
COPY status/* /app/
8-
RUN go build -o status
9-
105
FROM alpine:3.15 as download
116
ARG JETBRAINS_BACKEND_URL
127
WORKDIR /workdir
@@ -19,5 +14,5 @@ FROM scratch
1914
ARG SUPERVISOR_IDE_CONFIG
2015
COPY --chown=33333:33333 ${SUPERVISOR_IDE_CONFIG} /ide-desktop/supervisor-ide-config.json
2116
COPY --chown=33333:33333 startup.sh /ide-desktop/
22-
COPY --chown=33333:33333 --from=build /app/status /ide-desktop/
2317
COPY --chown=33333:33333 --from=download /workdir/ /ide-desktop/backend/
18+
COPY --chown=33333:33333 components-ide-jetbrains-image-status--app/status /ide-desktop/

components/ide/jetbrains/image/startup.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ set -euo pipefail
99
trap "jobs -p | xargs -r kill" SIGINT SIGTERM EXIT
1010

1111
/ide-desktop/status "$1" "$2" &
12-
13-
echo "Desktop IDE: Waiting for the content initializer ..."
14-
until curl -sS "$SUPERVISOR_ADDR"/_supervisor/v1/status/content/wait/true | grep '"available":true' > /dev/null; do
15-
sleep 1
16-
done
17-
echo "Desktop IDE: Content available."
18-
19-
export CWM_NON_INTERACTIVE=1
20-
export CWM_HOST_PASSWORD=gitpod
2112
export CWM_HOST_STATUS_OVER_HTTP_TOKEN=gitpod
22-
/ide-desktop/backend/bin/remote-dev-server.sh cwmHost "$GITPOD_REPO_ROOT" > >(sed 's/^/JetBrains remote-dev-server.sh (out): /') 2> >(sed 's/^/JetBrains remote-dev-server.sh (err): /' >&2)
13+
/ide-desktop/backend/bin/remote-dev-server.sh run "$GITPOD_REPO_ROOT" > >(sed 's/^/JetBrains remote-dev-server.sh (out): /') 2> >(sed 's/^/JetBrains remote-dev-server.sh (err): /' >&2)
2314

24-
echo "Desktop IDE startup script exited"
15+
echo "Desktop IDE startup script exited"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
packages:
2+
- name: app
3+
type: go
4+
srcs:
5+
- "**/*.go"
6+
- "go.mod"
7+
- "go.sum"
8+
env:
9+
- CGO_ENABLED=0
10+
- GOOS=linux
11+
deps:
12+
- components/supervisor-api/go:lib
13+
config:
14+
packaging: app
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
module github.com/gitpod-io/gitpod/jetbrains/status
22

33
go 1.17
4+
5+
6+
require google.golang.org/grpc v1.42.0
7+
8+
require github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 // indirect
9+
10+
require (
11+
github.com/gitpod-io/gitpod/supervisor/api v0.0.0-00010101000000-000000000000
12+
github.com/golang/protobuf v1.5.2 // indirect
13+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
14+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
15+
golang.org/x/text v0.3.5 // indirect
16+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
17+
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect
18+
google.golang.org/protobuf v1.27.1 // indirect
19+
)
20+
21+
replace github.com/gitpod-io/gitpod/supervisor/api => ../../../../supervisor-api/go // leeway

0 commit comments

Comments
 (0)