Skip to content

feat(prepare-sources): implement inject-build-tools module (RHIDP-15841) - #168

Open
polasudo wants to merge 4 commits into
redhat-developer:mainfrom
polasudo:RHIDP-15841-inject-build-tools
Open

polasudo wants to merge 4 commits into
redhat-developer:mainfrom
polasudo:RHIDP-15841-inject-build-tools

Conversation

@polasudo

@polasudo polasudo commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Implement the inject-build-tools pipeline module (Better Release message #9): cache @red-hat-developer-hub/cli under .yarn/cache/ and add a file: devDependency so hermetic Konflux builds can run offline exports.
  • Resolve CLI version (and optional cliPackage) by walking up from the overlay path to overlays versions.json.
  • Self-contained workspace file:.yarn/cache/… path (adapted from midstream offline-rhdh-cli.sh multi-workspace layout).
  • Fixture + behavioral tests covering package.json updates, cache/download, versions.json discovery, errors, and an e2e overlay layout.

Fixes RHIDP-15841

Test plan

  • vp check in prepare-sources/
  • vp test lib/modules/inject-build-tools/index.test.ts (24 tests)
  • Full vp test suite (86 passing)

Made with Cursor

Cache rhdh-cli via npm pack under .yarn/cache and add a file: devDependency
so hermetic Konflux builds can export plugins offline. Version comes from
overlays versions.json (walk up from overlay path).

Fixes RHIDP-15841

Co-authored-by: Cursor <cursoragent@cursor.com>
@jonkoops
jonkoops force-pushed the RHIDP-15841-inject-build-tools branch from 2f058b1 to 08348ed Compare September 30, 2026 09:51
@jonkoops
jonkoops self-requested a review September 30, 2026 09:51
polasudo and others added 3 commits October 1, 2026 10:41
CI required full coverage; add injectable exec + unit tests for the
default npm pack success and failure paths (RHIDP-15841).

Co-authored-by: Cursor <cursoragent@cursor.com>
Satisfy Sonar typescript:S2871 (reliability rating) on inject-build-tools.

Co-authored-by: Cursor <cursoragent@cursor.com>
When the CLI/action runs from prepare-sources/, local npm applied that
package's devEngines and failed packing @red-hat-developer-hub/cli.
Execute npm pack with cwd=destDir so only the pack-destination matters.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant