Skip to content

Commit 2b2f749

Browse files
committed
Use npm instead of yarn for code build
1 parent 2aba460 commit 2b2f749

File tree

1 file changed

+11
-32
lines changed

1 file changed

+11
-32
lines changed

components/ide/code/leeway.Dockerfile

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,14 @@
11
# Copyright (c) 2020 Gitpod GmbH. All rights reserved.
22
# Licensed under the GNU Affero General Public License (AGPL).
33
# 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
55

66
ENV TRIGGER_REBUILD 1
77

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-
258
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
269
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
2710
ENV VSCODE_ARCH=x64
28-
ENV NPM_REGISTRY=https://registry.yarnpkg.com
11+
ENV NPM_REGISTRY=https://registry.npmjs.org
2912

3013
ARG CODE_COMMIT
3114
ARG CODE_QUALITY
@@ -61,15 +44,11 @@ RUN apt-get install -y pkg-config dbus xvfb libgtk-3-0 libxkbfile-dev libkrb5-de
6144
# Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
6245
ENV DISABLE_V8_COMPILE_CACHE=1
6346

64-
ENV npm_config_arch=x64
47+
# ENV npm_config_arch=x64
6548
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 \
51+
&& npm run compile
7352

7453
# check that the provided codeVersion is the correct one for the given codeCommit
7554
RUN commitVersion=$(cat package.json | jq -r .version) \
@@ -91,11 +70,11 @@ RUN nameShort=$(jq --raw-output '.nameShort' product.json) && \
9170
mv product.json.tmp product.json && \
9271
jq '{quality,nameLong,nameShort}' product.json
9372

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
73+
RUN npm run gulp compile-build \
74+
&& npm run gulp extensions-ci \
75+
&& npm run gulp minify-vscode-reh \
76+
&& npm run gulp vscode-web-min-ci \
77+
&& npm run gulp vscode-reh-linux-x64-min-ci
9978

10079
# config for first layer needed by blobserve
10180
# this custom urls will be then replaced by blobserve.

0 commit comments

Comments
 (0)