1
1
# Copyright (c) 2020 Gitpod GmbH. All rights reserved.
2
2
# Licensed under the GNU Affero General Public License (AGPL).
3
3
# See License.AGPL.txt in the project root for license information.
4
- FROM gitpod/openvscode-server-linux-build-agent:centos7-devtoolset8- x64 as dependencies_builder
4
+ FROM gitpod/openvscode-server-linux-build-agent:focal- x64 as code_builder
5
5
6
6
ENV TRIGGER_REBUILD 1
7
7
8
- ARG CODE_COMMIT
9
-
10
- RUN mkdir /gp-code \
11
- && cd /gp-code \
12
- && git init \
13
- && git remote add origin https://github.com/gitpod-io/openvscode-server \
14
- && git fetch origin $CODE_COMMIT --depth=1 \
15
- && git reset --hard FETCH_HEAD
16
- WORKDIR /gp-code
17
-
18
- # Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
19
- ENV DISABLE_V8_COMPILE_CACHE=1
20
-
21
- RUN yarn --cwd remote --frozen-lockfile --network-timeout 180000
22
-
23
- FROM gitpod/openvscode-server-linux-build-agent:focal-x64 as code_builder
24
-
25
8
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
26
9
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
27
10
ENV VSCODE_ARCH=x64
28
- ENV NPM_REGISTRY=https://registry.yarnpkg.com
11
+ ENV NPM_REGISTRY=https://registry.npmjs.org
29
12
30
13
ARG CODE_COMMIT
31
14
ARG CODE_QUALITY
@@ -61,15 +44,10 @@ RUN apt-get install -y pkg-config dbus xvfb libgtk-3-0 libxkbfile-dev libkrb5-de
61
44
# Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
62
45
ENV DISABLE_V8_COMPILE_CACHE=1
63
46
64
- ENV npm_config_arch=x64
47
+ # ENV npm_config_arch=x64
65
48
RUN mkdir -p .build \
66
- && yarn config set registry "$NPM_REGISTRY" \
67
- && yarn --cwd build --frozen-lockfile --check-files --network-timeout 180000 \
68
- && yarn --frozen-lockfile --check-files --network-timeout 180000
69
-
70
- # copy remote dependencies build in dependencies_builder image
71
- RUN rm -rf remote/node_modules/
72
- COPY --from=dependencies_builder /gp-code/remote/node_modules/ /gp-code/remote/node_modules/
49
+ && npm config set registry "$NPM_REGISTRY" \
50
+ && npm ci
73
51
74
52
# check that the provided codeVersion is the correct one for the given codeCommit
75
53
RUN commitVersion=$(cat package.json | jq -r .version) \
@@ -91,23 +69,23 @@ RUN nameShort=$(jq --raw-output '.nameShort' product.json) && \
91
69
mv product.json.tmp product.json && \
92
70
jq '{quality,nameLong,nameShort}' product.json
93
71
94
- RUN yarn gulp compile-build \
95
- && yarn gulp extensions-ci \
96
- && yarn gulp minify-vscode-reh \
97
- && yarn gulp vscode-web-min-ci \
98
- && yarn gulp vscode-reh-linux-x64-min-ci
72
+ RUN npm run gulp compile-build \
73
+ && npm run gulp extensions-ci \
74
+ && npm run gulp minify-vscode-reh \
75
+ && npm run gulp vscode-web-min-ci \
76
+ && npm run gulp vscode-reh-linux-x64-min-ci
99
77
100
78
# config for first layer needed by blobserve
101
79
# this custom urls will be then replaced by blobserve.
102
80
# Check pkg/blobserve/blobserve.go, `inlineVars` method
103
- RUN cp /vscode-web/out/vs/gitpod/browser/workbench/workbench.html /vscode-web/index.html \
104
- && cp /vscode-web/out/vs/gitpod/browser/workbench/callback.html /vscode-web/callback.html \
105
- && sed -i -e "s/{{VERSION}}/$CODE_QUALITY-$CODE_COMMIT/g" /vscode-web/index.html
81
+ RUN cp /vscode-web/out/vs/gitpod/browser/workbench/workbench.esm. html /vscode-web/index.html \
82
+ && cp /vscode-web/out/vs/gitpod/browser/workbench/callback.html /vscode-web/callback.html \
83
+ && sed -i -e "s/{{VERSION}}/$CODE_QUALITY-$CODE_COMMIT/g" /vscode-web/index.html
106
84
107
85
# cli config: alises to gitpod-code
108
86
RUN cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/code \
109
- && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/gp-code \
110
- && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/open
87
+ && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/gp-code \
88
+ && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/open
111
89
112
90
# grant write permissions for built-in extensions
113
91
RUN chmod -R ugo+w /vscode-reh-linux-x64/extensions
0 commit comments