Skip to content
Open
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
13 changes: 12 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
"name": "Node.js",
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:24-trixie",
"postCreateCommand": "./scripts/setup-devcontainer.sh",
"remoteUser": "node"
"remoteUser": "node",
"customizations": {
"vscode": {
"extensions": [
"SonarSource.sonarlint-vscode"
],
"settings": {
"sonarlint.pathToNodeExecutable": "/usr/local/bin/node",
"sonarlint.ls.javaHome": "/usr/lib/jvm/java-25-openjdk-arm64"
}
}
}
}
20 changes: 20 additions & 0 deletions scripts/setup-devcontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@
sudo apt install -y google-cloud-cli
}

install_openjdk_25() {

Check warning on line 20 in scripts/setup-devcontainer.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add an explicit return statement at the end of the function.

See more on https://sonarcloud.io/project/issues?id=DataBiosphere_duos-ui&issues=AZ2c1t5Q0EzrWDwSQ8p2&open=AZ2c1t5Q0EzrWDwSQ8p2&pullRequest=3444
sudo apt update
sudo apt install -y openjdk-25-jdk

java_bin="$(readlink -f "$(command -v javac)")"
java_home="${java_bin%/bin/javac}"

# Set JAVA_HOME in /etc/profile.d so it's available to all users in all shells
echo "export JAVA_HOME=\"$java_home\"" | sudo tee /etc/profile.d/java-home.sh >/dev/null
sudo chmod 644 /etc/profile.d/java-home.sh

# Also update /etc/environment for non-interactive shells
if sudo grep -q '^JAVA_HOME=' /etc/environment; then
sudo sed -i "s|^JAVA_HOME=.*|JAVA_HOME=\"$java_home\"|" /etc/environment
else
echo "JAVA_HOME=\"$java_home\"" | sudo tee -a /etc/environment >/dev/null
fi
}

install_duos_cypress() {
npm install
npx cypress install
Expand All @@ -42,6 +61,7 @@
cypress_requirements
gcloud_cli_requirements
install_gcloud_cli
install_openjdk_25
install_duos_cypress
install_duos_config
}
Expand Down
Loading