mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
A tool that opens the container picks a workspace path of its own when the configuration names none, and `.gitlab/ci/devcontainer-run.sh` mounts the source tree at a path it spells itself. The two disagreed: an editor opened the tree at `/workspaces/cmake` while CI used the `/home/cmake-dev/workspace` that `create_user.sh` prepares for it. Say which one it is, so that a path means the same thing everywhere.
50 lines
1.5 KiB
JSON
50 lines
1.5 KiB
JSON
{
|
|
"name": "CMake",
|
|
"build": {
|
|
"dockerfile": "Dockerfile"
|
|
},
|
|
"remoteUser": "cmake-dev",
|
|
// Name the workspace path explicitly rather than take the default a tool
|
|
// picks for itself, so that the path is the same under every tool and in
|
|
// the CI job of `.gitlab/ci/devcontainer-run.sh`, which mounts the source
|
|
// tree itself. `create_user.sh` creates the directory and gives it to the
|
|
// container user.
|
|
"workspaceFolder": "/home/cmake-dev/workspace",
|
|
"workspaceMount": "source=${localWorkspaceFolder},target=/home/cmake-dev/workspace,type=bind",
|
|
"containerEnv": {
|
|
"GITLAB_HOST": "gitlab.kitware.com"
|
|
},
|
|
"remoteEnv": {
|
|
"GITLAB_CLIENT_ID": "${localEnv:GITLAB_CLIENT_ID}",
|
|
"GITLAB_TOKEN": "${localEnv:GITLAB_TOKEN}"
|
|
},
|
|
"mounts": [
|
|
{
|
|
"type": "volume",
|
|
"source": "cmake-dev-ccache",
|
|
"target": "/home/cmake-dev/.cache/ccache"
|
|
},
|
|
{
|
|
"type": "volume",
|
|
"source": "cmake-dev-glab-cli",
|
|
"target": "/home/cmake-dev/.config/glab-cli"
|
|
}
|
|
],
|
|
"postAttachCommand": "${containerWorkspaceFolder}/.devcontainer/setup-status.sh",
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"EditorConfig.EditorConfig",
|
|
"ms-vscode.cmake-tools",
|
|
"ms-vscode.cpptools",
|
|
"lextudio.restructuredtext",
|
|
"llvm-vs-code-extensions.vscode-clangd"
|
|
],
|
|
"settings": {
|
|
"C_Cpp.clang_format_path": "/usr/bin/clang-format-18",
|
|
"cmake.configureOnOpen": false
|
|
}
|
|
}
|
|
}
|
|
}
|