Skip to content

Commit adf265b

Browse files
committed
fix: Migrate away from Yarn v1 in che-machine-exec
Fixes: https://issues.redhat.com/browse/CRW-10005 Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
1 parent a06c2cd commit adf265b

6 files changed

Lines changed: 5598 additions & 4094 deletions

File tree

build/dockerfiles/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ COPY . .
4444
ENV CGO_ENABLED=1
4545
RUN GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o /go/bin/che-machine-exec .
4646

47-
# NOTE: could not compile with node:18-alpine, so for now stick with node:16-alpine
48-
FROM docker.io/node:16-alpine as cloud_shell_builder
47+
FROM docker.io/node:18-alpine as cloud_shell_builder
48+
RUN corepack enable && corepack prepare yarn@4.0.0 --activate
4949
COPY --from=go_builder /che-machine-exec/cloud-shell cloud-shell-src
5050
WORKDIR cloud-shell-src
51-
RUN yarn && \
51+
RUN yarn install --immutable && \
5252
yarn run build && \
5353
mkdir /app && \
5454
cp -rf index.html dist node_modules /app

cloud-shell/.yarn/install-state.gz

439 KB
Binary file not shown.

cloud-shell/.yarnrc.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2026 Red Hat, Inc.
3+
# This program and the accompanying materials are made
4+
# available under the terms of the Eclipse Public License 2.0
5+
# which is available at https://www.eclipse.org/legal/epl-2.0/
6+
#
7+
# SPDX-License-Identifier: EPL-2.0
8+
#
9+
# Contributors:
10+
# Red Hat, Inc. - initial API and implementation
11+
#
12+
13+
nodeLinker: node-modules

cloud-shell/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"resolutions": {
2929
"cipher-base": "^1.0.6",
3030
"sha.js": "^2.4.12"
31-
}
31+
},
32+
"packageManager": "yarn@4.12.0"
3233
}

0 commit comments

Comments
 (0)