added files

This commit is contained in:
Your Name
2026-08-26 02:02:24 +05:30
parent 58ee8a276a
commit 3419cfba0c
200 changed files with 22132 additions and 0 deletions
@@ -0,0 +1,49 @@
<!-- m-wiki: type=concept slug=node-paired-files topic=build base-sha=28f54cf7bef9 generated-at=2026-05-12T00:00:00+00:00 sources=[] -->
> Generated 2026-05-12 at base-sha 28f54cf7bef9. Type: concept. 0 sources.
# Node Build: Paired File Rule
`src/com/meesho/stages/buildNode.groovy` and `resources/com/meesho/node-Dockerfile` are paired files. Changes to Node install logic in one must be mirrored in the other to avoid a split-brain build path.
## Where it applies in this repo
`src/com/meesho/stages/buildNode.groovy:buildDckr`
`resources/com/meesho/node-Dockerfile`
## How they interact
`buildNode.groovy` detects the package manager at runtime (npm vs pnpm vs yarn) and passes the install command to the Dockerfile as the `npm_install_arg` template variable. The Dockerfile's `else` branch handles the fallback when no explicit or detected command is provided (currently `npm ci`).
```
buildNode.buildDckr(config):
├─ Detect package manager → npm_install_arg = "pnpm install" | "npm ci" | ...
├─ constructTemplate.renderTemplate(binding, 'node-Dockerfile')
│ └─ binding.npm_install_arg → substituted into node-Dockerfile
└─ docker build -f Dockerfile ...
```
When `npm_install_arg` is not set in `config.yaml`, `buildNode.groovy` falls back to its own detection logic. The Dockerfile default branch handles the case where detection produces nothing.
## Why this matters
If `buildNode.groovy` changes the fallback install command or adds support for a new package manager, the Dockerfile default branch must be updated in the same PR. Changing only one file leaves them out of sync: the runtime path may succeed while the Docker fallback uses the old command (or vice versa). This creates subtly different images depending on whether `npm_install_arg` is explicitly configured.
## Related
- [Language builds](../07-LANGUAGE-BUILDS.md) — Node builder overview
- [Dockerfile templates](../08-DOCKERFILE-TEMPLATES.md) — how renderTemplate works
## Sources
(no raw/ sources)
## Notes
<!-- Anything below is human-owned. wiki-init never reads or modifies content under this heading. -->
---
[← Wiki index](../../index.md)
<!-- atomic: keep this page ≤600 words. New scope → new concept page that builds on this one. Do not append paragraphs here. -->