Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Test Remote Tunnel Access to Workspace #164

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build/dockerfiles/assembly.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ RUN for f in "/mnt/rootfs/bin/" "/mnt/rootfs/home/che" "/mnt/rootfs/etc/passwd"
COPY --from=machine-exec --chown=0:0 /go/bin/che-machine-exec /mnt/rootfs/bin/machine-exec
COPY --chmod=755 /build/scripts/*.sh /mnt/rootfs/

RUN curl https://az764295.vo.msecnd.net/stable/97dec172d3256f8ca4bfb2143f3f76b503ca0534/vscode_cli_alpine_x64_cli.tar.gz | tar -xz -C /mnt/rootfs

# Create all-in-one image
FROM scratch
COPY --from=ubi-builder /mnt/rootfs/ /
Expand Down
4 changes: 4 additions & 0 deletions code/extensions/che-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"command": "che-remote.command.openDocumentation",
"title": "%openDocumentationCommand%"
},
{
"command": "che-remote.command.startTunnel",
"title": "%startTunnelCommand%"
},
{
"command": "che-remote.command.openDashboard",
"title": "%openDashboardCommand%",
Expand Down
1 change: 1 addition & 0 deletions code/extensions/che-remote/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"displayName": "Eclipse Che Remote",
"description": "Provides remoteIndicator commands",
"openDocumentationCommand": "Eclipse Che: Open Documentation",
"startTunnelCommand": "Eclipse Che: Turn on Remote Tunnel Access to Workspace...",
"openDashboardCommand": "Eclipse Che: Open Dashboard",
"stopWorkspaceCommand": "Eclipse Che: Stop Workspace"
}
7 changes: 7 additions & 0 deletions code/extensions/che-remote/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
})
);

context.subscriptions.push(
vscode.commands.registerCommand('che-remote.command.startTunnel', () => {
const terminal = vscode.window.createTerminal(`Tunnel`);
terminal.sendText("./code tunnel --accept-server-license-terms --name ${DEVWORKSPACE_NAME}");
})
);

// add dashboard command only if env variable is set
const dashboardUrl = process.env.CHE_DASHBOARD_URL;
if (dashboardUrl) {
Expand Down