Skip to content

Commit ea57c6b

Browse files
vrubezhnyrgrunber
authored andcommitted
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 ea57c6b

8 files changed

Lines changed: 5561 additions & 4096 deletions

File tree

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"golang.go"
4+
]
5+
}

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
"request": "launch",
77
"name": "Bash-Debug (simplest configuration)",
88
"program": "${file}"
9+
},
10+
{
11+
"name": "Remote debug che-machine-exec",
12+
"type": "go",
13+
"request": "launch",
14+
"mode": "auto",
15+
"program": "${workspaceFolder}",
16+
"cwd": "${workspaceFolder}",
17+
"args": [
18+
"--url", "0.0.0.0:3130",
19+
"--static", "${workspaceFolder}/cloud-shell"
20+
]
921
}
1022
]
1123
}

build/dockerfiles/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2012-2022 Red Hat, Inc.
2+
# Copyright (c) 2012-2026 Red Hat, Inc.
33
# This program and the accompanying materials are made
44
# available under the terms of the Eclipse Public License 2.0
55
# which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -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:22-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/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
dist
22
node_modules
3+
4+
.yarn/*
5+
!.yarn/releases
6+
!.yarn/plugins
7+
!.yarn/patches
8+
!.yarn/sdks
9+
!.yarn/versions

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)