microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.86k stars 595 forks source link

INFORMATION REQUEST - rush build unable to find script commands in Jenkins #4182

Open cabreraction opened 1 year ago

cabreraction commented 1 year ago

Hi, I was unable to find somewhere else to post this question, hence I'm publishing it here. I'm currently trying to build a project using rushjs in Jenkins via a node docker image, however rush is unable to find the script commands and always returns a command not found error. I read in the documentation that rush uses PATH variable to run these commands, I added the bind folder from temp to the PATH variable, but is still not recognizing them. Have you encountered this issue in the past? Could there be something that I'm missing?

dmichon-msft commented 1 year ago

When you say it is unable to find the script commands, do you mean that the alias "rush" does not resolve, or that when it performs a build or other command that the individual projects don't have the script defined?

In the former case, the usual recommendation for a CI workflow is to invoke the common/scripts/install-run-rush.js script in place of rush in your CLI command, e.g. node common/scripts/install-run-rush.js build.

iclanton commented 1 year ago

Do you mean your individual projects' build commands aren't finding tools' bins? Are the tools you're trying to invoke in project scripts dependencies of the project? Rush resolves bins from individual projects' node_modules/.bin/ folders.