Add ability to configure working directory for unzipping/running node#369
Add ability to configure working directory for unzipping/running node#369nainslie wants to merge 1 commit intomadskristensen:masterfrom
Conversation
|
This issue seems to be causing some intermittent failures during out builds as well. I see that one of the tests is failing for this PR. Any ETA when this may be fixed, merged, and released? |
|
This would be extremely useful. WebCompiler causes our TFS builds to take twice as long because it reinstalls itself every time, which can take up to 20 minutes. |
|
I've brought this PR up-to-date with upstream. Please consider for merging. |
… modules Added support for environment variable WEBCOMPILER_WORKING_DIRECTORY in CompilerService. If set, we will unzip node.exe and node modules into a subdirectory of this directory instead of into the system temp directory. This is intended for CI or build server environments where temp directories are often cleaned after every run, or are set per-build-agent.
|
This made a big difference in our build times. We maybe have issues with antivirus software on our build server or something (?), but it for real shaved 45 minutes off the typical time it takes to do a build. Thanks @nainslie I made a fork with this in it and created a package for it that anyone can put on their own NuGet server: https://github.com/mhenry1384/WebCompiler |
This has fixed intermittent issues that are similar to #272 on our TeamCity CI server. By allowing us to configure the location we use to unzip the node.exe and node_modules directory we can verify that our build agents have the appropriate permissions and that files are not being cleaned or locked during builds.
To do this, we added support for an environment variable "WEBCOMPILER_WORKING_DIRECTORY" in
CompilerService. If set, we will unzip node.exe and node modules into a subdirectory of this directory instead of into the system temp directory.
This is intended for CI or build server environments where temp directories are often cleaned after every run, or are set per-build-agent.