Skip to content

BUILD-9995 add working-directory input to build-yarn#191

Merged
julien-carsique-sonarsource merged 2 commits intomasterfrom
feat/jcarsique/BUILD-9995-yarnWorkingDir
Dec 17, 2025
Merged

BUILD-9995 add working-directory input to build-yarn#191
julien-carsique-sonarsource merged 2 commits intomasterfrom
feat/jcarsique/BUILD-9995-yarnWorkingDir

Conversation

@julien-carsique-sonarsource
Copy link
Copy Markdown
Contributor

@julien-carsique-sonarsource julien-carsique-sonarsource commented Dec 17, 2025

BUILD-9995 add working-directory input to build-yarn

Fix attestation artifacts path when working-directory is set: use absolute paths instead of relative.
Fix Yarn authentication

Tested with

@julien-carsique-sonarsource julien-carsique-sonarsource requested a review from a team December 17, 2025 10:01
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod Bot commented Dec 17, 2025

BUILD-9995

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-9995-yarnWorkingDir branch from b87c914 to d97d066 Compare December 17, 2025 14:28
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as draft December 17, 2025 14:32
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-9995-yarnWorkingDir branch from b3e9c36 to dced57e Compare December 17, 2025 14:36
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as ready for review December 17, 2025 14:36
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-9995-yarnWorkingDir branch from dced57e to 1f79222 Compare December 17, 2025 14:45
Comment thread build-yarn/build.sh Outdated
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-9995-yarnWorkingDir branch from 1f79222 to 2d3aaa9 Compare December 17, 2025 16:32
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-9995-yarnWorkingDir branch from 2d3aaa9 to 371a041 Compare December 17, 2025 16:35
@sonarqubecloud
Copy link
Copy Markdown

SonarQube reviewer guide

Important

We are currently testing different models for AI Summary.
Please give us your feedback by filling this form.

Model A:

Summary: Add working-directory input to support building Yarn projects in subdirectories.

Review Focus:

  • Configuration file generation changes from npm config set to direct .npmrc and .yarnrc.yml file creation
  • Working directory propagation through all action steps and script execution
  • Absolute path handling in export_built_artifacts function

Start review at: build-yarn/build.sh. The NPM/Yarn configuration approach has been fundamentally changed from CLI commands to direct config file generation, which is the most critical and risky change in this PR.

Model B:

Summary: Add working-directory input to support executing builds in subdirectories, and refactor npm/yarn configuration management to use config files instead of CLI commands.

Review Focus:

  • The npm/yarn configuration refactoring in build.sh (lines 93-107) changes from CLI-based config to file-based .npmrc and .yarnrc.yml. Verify the config format is correct and authentication tokens are properly handled.
  • Ensure the working-directory input is correctly propagated through all build steps (mise-action, build.sh execution).
  • The artifact path fix using $PWD in export_built_artifacts() - confirm this works correctly with the new working-directory feature.

Start review at: build-yarn/action.yml. This is the entry point where the new input is defined and passed to downstream steps. Understanding how working-directory flows through the action is critical before reviewing the shell script changes.

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@julien-carsique-sonarsource julien-carsique-sonarsource merged commit ce91a6b into master Dec 17, 2025
11 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the feat/jcarsique/BUILD-9995-yarnWorkingDir branch December 17, 2025 16:38
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.

2 participants