Skip to content

Add ability to configure working directory for unzipping/running node #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nainslie
Copy link

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.

@zpavic
Copy link

zpavic commented Aug 15, 2018

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?

@mhenry1384
Copy link

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.

@nainslie
Copy link
Author

nainslie commented Feb 8, 2019

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.
@mhenry1384
Copy link

mhenry1384 commented Mar 16, 2019

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

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.

4 participants