Skip to content

Commit 8877c66

Browse files
committed
feat: add vscode frontend feature for new amalthea
1 parent ec5dda7 commit 8877c66

6 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
matrix:
3636
features:
3737
- renku
38+
- vscode
3839
steps:
3940
- uses: actions/checkout@v3
4041

src/vscode/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
# Renku CLI (renku)
3+
4+
Installs vscode for running in Renku.
5+
6+
## Example Usage
7+
8+
```json
9+
"features": {
10+
"ghcr.io/SwissDataScienceCenter/devcontainer-features/vscode:1": {}
11+
}
12+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "VSCode frontend for Renku",
3+
"id": "vscode",
4+
"version": "1.0.0",
5+
"description": "Installs vscode and sets the correct entrypoint for running on Renku.",
6+
"options": {},
7+
"dependsOn": {
8+
"ghcr.io/devcontainers-extra/features/vscode-cli:1": {
9+
// The version is taken from https://github.com/microsoft/vscode/tags
10+
"version": "1.95.2"
11+
}
12+
}
13+
"init": true,
14+
"entrypoint": "tini -- code serve-web --server-base-path \"$RENKU_BASE_URL_PATH/\" --without-connection-token --host 0.0.0.0 --port 8888"
15+
}

src/vscode/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/bash -i

test/vscode/scenarios.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"ubuntu": {
3+
"image": "ubuntu",
4+
"features": {
5+
"vscode": {}
6+
}
7+
}
8+
}

test/vscode/ubuntu.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library bundled with the devcontainer CLI
6+
source dev-container-features-test-lib
7+
8+
# Feature-specific tests
9+
# The 'check' command comes from the dev-container-features-test-lib.
10+
check "code cli is available" bash -c "code --help"
11+
check "code serve-web cli is available" bash -c "code serve-web --help"
12+
13+
# Report results
14+
# If any of the checks above exited with a non-zero exit code, the test will fail.
15+
reportResults

0 commit comments

Comments
 (0)