From c215e32cbd12a3daa9b948fa4d5ff69dbdcce85a Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 30 Oct 2023 16:38:03 +0100 Subject: [PATCH] Publish deprecation message for dev --- build/config.json | 1 + build/src/utils/config.js | 56 ++++++++++++------- .../vscode/.devcontainer/base.Dockerfile | 7 +++ .../microsoft/vscode/definition-manifest.json | 2 +- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/build/config.json b/build/config.json index 65d54634..bbc10114 100644 --- a/build/config.json +++ b/build/config.json @@ -7,6 +7,7 @@ "githubRepoName": "microsoft/vscode-dev-containers", "containersPathInRepo": "containers", "historyFolderName": "history", + "repoContainersToBuildPath": "repository-containers/images", "scriptLibraryPathInRepo": "script-library", "scriptLibraryFolderNameInDefinition": "library-scripts", "historyUrlPrefix": "https://github.com/microsoft/vscode-dev-containers/tree/main/containers/", diff --git a/build/src/utils/config.js b/build/src/utils/config.js index 32c3721b..572d751e 100644 --- a/build/src/utils/config.js +++ b/build/src/utils/config.js @@ -24,34 +24,48 @@ async function loadConfig(repoPath) { repoPath = repoPath || path.join(__dirname, '..', '..', '..'); const definitionBuildConfigFile = getConfig('definitionBuildConfigFile', 'definition-manifest.json'); - // Get list of definition folders - const containersPath = path.join(repoPath, getConfig('containersPathInRepo', 'containers')); - const definitions = await asyncUtils.readdir(containersPath, { withFileTypes: true }); - await asyncUtils.forEach(definitions, async (definitionFolder) => { - // If directory entry is a file (like README.md, skip - if (!definitionFolder.isDirectory()) { - return; - } + // // Get list of definition folders + // const containersPath = path.join(repoPath, getConfig('containersPathInRepo', 'containers')); + // const definitions = await asyncUtils.readdir(containersPath, { withFileTypes: true }); + // await asyncUtils.forEach(definitions, async (definitionFolder) => { + // // If directory entry is a file (like README.md, skip + // if (!definitionFolder.isDirectory()) { + // return; + // } - const definitionId = definitionFolder.name; - const definitionPath = path.resolve(path.join(containersPath, definitionId)); + // const definitionId = definitionFolder.name; + // const definitionPath = path.resolve(path.join(containersPath, definitionId)); - // If a .deprecated file is found, remove the directory from staging and return - if(await asyncUtils.exists(path.join(definitionPath, '.deprecated'))) { - await asyncUtils.rimraf(definitionPath); - return; - } + // // If a .deprecated file is found, remove the directory from staging and return + // if(await asyncUtils.exists(path.join(definitionPath, '.deprecated'))) { + // await asyncUtils.rimraf(definitionPath); + // return; + // } - // Add to complete list of definitions + // // Add to complete list of definitions + // allDefinitionPaths[definitionId] = { + // path: definitionPath, + // relativeToRootPath: path.relative(repoPath, definitionPath) + // } + // // If definition-manifest.json exists, load it + // const manifestPath = path.join(definitionPath, definitionBuildConfigFile); + // if (await asyncUtils.exists(manifestPath)) { + // await loadDefinitionManifest(manifestPath, definitionId); + // } + // }); + + // Load repo containers to build + const repoContainersToBuildPath = path.join(repoPath, getConfig('repoContainersToBuildPath', 'repository-containers/build')); + const repoContainerManifestFiles = glob.sync(`${repoContainersToBuildPath}/**/${definitionBuildConfigFile}`); + await asyncUtils.forEach(repoContainerManifestFiles, async (manifestFilePath) => { + const definitionPath = path.resolve(path.dirname(manifestFilePath)); + const definitionId = path.relative(repoContainersToBuildPath, definitionPath); + console.log(`Loading definition ID: ${definitionId}`); allDefinitionPaths[definitionId] = { path: definitionPath, relativeToRootPath: path.relative(repoPath, definitionPath) } - // If definition-manifest.json exists, load it - const manifestPath = path.join(definitionPath, definitionBuildConfigFile); - if (await asyncUtils.exists(manifestPath)) { - await loadDefinitionManifest(manifestPath, definitionId); - } + await loadDefinitionManifest(manifestFilePath, definitionId); }); // Populate image variants and tag lookup diff --git a/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile b/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile index a26fc94b..d5b3e8ea 100644 --- a/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile +++ b/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile @@ -23,3 +23,10 @@ ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" \ ENTRYPOINT ["/usr/local/share/desktop-init.sh"] CMD ["sleep", "infinity"] + +RUN echo 'echo "NOTE: This Docker image has been discontinued and no longer receives any updates."' \ + | tee -a /home/node/.bashrc \ + | tee -a /home/node/.zshrc \ + | tee -a /root/.bashrc \ + | tee -a /root/.zshrc \ + >/dev/null diff --git a/repository-containers/images/github.com/microsoft/vscode/definition-manifest.json b/repository-containers/images/github.com/microsoft/vscode/definition-manifest.json index 10efcf55..00de6068 100644 --- a/repository-containers/images/github.com/microsoft/vscode/definition-manifest.json +++ b/repository-containers/images/github.com/microsoft/vscode/definition-manifest.json @@ -1,5 +1,5 @@ { - "definitionVersion": "0.204.0", + "definitionVersion": "0.204.1", "build": { "latest": true, "rootDistro": "debian",