Skip to content

Commit 0852ff7

Browse files
Enable installFromSource for GCP apps (#230)
1 parent 786ba22 commit 0852ff7

File tree

8 files changed

+26
-7
lines changed

8 files changed

+26
-7
lines changed

features/src/workbench-tools/NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
- *VEP==114.2
1313

1414
_*: These need to be built from source and will only be included if
15-
`installFromSource` is set to `true`._
15+
`installFromSource` is set to `true` or `cloud` is set to `gcp`._

features/src/workbench-tools/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Installs common tools for Workbench Apps. Currently it only supports Debian-base
1515

1616
| Options Id | Description | Type | Default Value |
1717
|-----|-----|-----|-----|
18+
| cloud | Cloud provider to install CLI tools for. If set to \"gcp\", installFromSource will default to true. | string | "" |
1819
| installFromSource | Install tools that require building from source. This may take a long time. | boolean | false |
1920

2021
## Versions
@@ -31,7 +32,7 @@ Installs common tools for Workbench Apps. Currently it only supports Debian-base
3132
- *VEP==114.2
3233

3334
_*: These need to be built from source and will only be included if
34-
`installFromSource` is set to `true`._
35+
`installFromSource` is set to `true` or `cloud` is set to `gcp`._
3536

3637

3738
---

features/src/workbench-tools/devcontainer-feature.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"name": "Workbench Tools",
55
"description": "Installs common tools for Workbench Apps. Currently it only supports Debian-based systems (e.g. Ubuntu) on x86_64.",
66
"options": {
7+
"cloud": {
8+
"type": "string",
9+
"default": "",
10+
"description": "Cloud provider to install CLI tools for. If set to \"gcp\", installFromSource will default to true."
11+
},
712
"installFromSource": {
813
"type": "boolean",
914
"default": false,

features/src/workbench-tools/install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ set -o nounset
88
set -o pipefail
99
set -o xtrace
1010

11-
readonly INSTALL_FROM_SOURCE="${INSTALLFROMSOURCE:-"false"}"
11+
readonly CLOUD="${CLOUD:-""}"
12+
INSTALL_FROM_SOURCE="${INSTALLFROMSOURCE:-"false"}"
13+
if [[ "$CLOUD" = "gcp" ]]; then
14+
INSTALL_FROM_SOURCE="true"
15+
fi
16+
readonly INSTALL_FROM_SOURCE
1217

1318
export DEBIAN_FRONTEND=noninteractive
1419
export TZ=Etc/UTC

src/custom-workbench-jupyter-template/.devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"${templateOption:login}"
2121
],
2222
"features": {
23-
"./.devcontainer/features/workbench-tools": {}
23+
"./.devcontainer/features/workbench-tools": {
24+
"cloud": "${templateOption:cloud}"
25+
}
2426
},
2527
"remoteUser": "root",
2628
"customizations": {

src/jupyter-aou/.devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
// re-mount bucket files on container start up
1010
"postStartCommand": "./startupscript/remount-on-restart.sh jupyter /home/jupyter \"${templateOption:cloud}\" \"${templateOption:login}\"",
1111
"features": {
12-
"./.devcontainer/features/workbench-tools": {}
12+
"./.devcontainer/features/workbench-tools": {
13+
"cloud": "${templateOption:cloud}"
14+
}
1315
},
1416
"remoteUser": "root",
1517
"customizations": {

src/r-analysis/.devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
},
3030
"ghcr.io/devcontainers/features/aws-cli@sha256:bbc9fd513c22e331953126c75ad7b2ed1f9044f1cd5890b7073b634810459b18": {},
3131
"ghcr.io/dhoeric/features/google-cloud-cli@sha256:fa5d894718825c5ad8009ac8f2c9f0cea3d1661eb108a9d465cba9f3fc48965f": {},
32-
"./.devcontainer/features/workbench-tools": {}
32+
"./.devcontainer/features/workbench-tools": {
33+
"cloud": "${templateOption:cloud}"
34+
}
3335
},
3436
"remoteUser": "root"
3537
}

src/vscode/.devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
},
2121
"ghcr.io/devcontainers/features/aws-cli@sha256:bbc9fd513c22e331953126c75ad7b2ed1f9044f1cd5890b7073b634810459b18": {},
2222
"ghcr.io/dhoeric/features/google-cloud-cli@sha256:fa5d894718825c5ad8009ac8f2c9f0cea3d1661eb108a9d465cba9f3fc48965f": {},
23-
"./.devcontainer/features/workbench-tools": {}
23+
"./.devcontainer/features/workbench-tools": {
24+
"cloud": "${templateOption:cloud}"
25+
}
2426
},
2527
"remoteUser": "root",
2628
"customizations": {

0 commit comments

Comments
 (0)