How to Use npm cache on Server with Multiple Build Agents









up vote
1
down vote

favorite












I'd like to use npm on an on-premises Windows server hosting multiple TFS 2015 Build Agents. The agents themselves are set up and configured already, and npm has been installed on the server. The issue that concerns me is the possibility of npm cache collisions and possible corruption if multiple agents are accessing the npm cache at the same time for different builds. All agents must run under the same service account, so even if I override the cache setting in the user config .npmrc file located at %USERPROFILE%.npmrc, this will still have all build agents using the same npm cache location (since they're all using the same account and thus use the same .npmrc file). Is there a way to specify an npm cache for each agent on the same machine, such that each agent folder could have its own nested npm-cache sub-folder (and would be used only by builds executed by that respective agent)?










share|improve this question





















  • did you try to run some builds at the same time and check if it doing corruption?
    – Shayki Abramczyk
    Nov 12 at 10:56










  • @ShaykiAbramczyk, I haven't tried on this current server, but I've seen it happen before on a previous build server that hosted multiple TFS XAML build agents. I'm trying to prevent that from happening this time around. :-)
    – Michael
    Nov 12 at 14:30














up vote
1
down vote

favorite












I'd like to use npm on an on-premises Windows server hosting multiple TFS 2015 Build Agents. The agents themselves are set up and configured already, and npm has been installed on the server. The issue that concerns me is the possibility of npm cache collisions and possible corruption if multiple agents are accessing the npm cache at the same time for different builds. All agents must run under the same service account, so even if I override the cache setting in the user config .npmrc file located at %USERPROFILE%.npmrc, this will still have all build agents using the same npm cache location (since they're all using the same account and thus use the same .npmrc file). Is there a way to specify an npm cache for each agent on the same machine, such that each agent folder could have its own nested npm-cache sub-folder (and would be used only by builds executed by that respective agent)?










share|improve this question





















  • did you try to run some builds at the same time and check if it doing corruption?
    – Shayki Abramczyk
    Nov 12 at 10:56










  • @ShaykiAbramczyk, I haven't tried on this current server, but I've seen it happen before on a previous build server that hosted multiple TFS XAML build agents. I'm trying to prevent that from happening this time around. :-)
    – Michael
    Nov 12 at 14:30












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'd like to use npm on an on-premises Windows server hosting multiple TFS 2015 Build Agents. The agents themselves are set up and configured already, and npm has been installed on the server. The issue that concerns me is the possibility of npm cache collisions and possible corruption if multiple agents are accessing the npm cache at the same time for different builds. All agents must run under the same service account, so even if I override the cache setting in the user config .npmrc file located at %USERPROFILE%.npmrc, this will still have all build agents using the same npm cache location (since they're all using the same account and thus use the same .npmrc file). Is there a way to specify an npm cache for each agent on the same machine, such that each agent folder could have its own nested npm-cache sub-folder (and would be used only by builds executed by that respective agent)?










share|improve this question













I'd like to use npm on an on-premises Windows server hosting multiple TFS 2015 Build Agents. The agents themselves are set up and configured already, and npm has been installed on the server. The issue that concerns me is the possibility of npm cache collisions and possible corruption if multiple agents are accessing the npm cache at the same time for different builds. All agents must run under the same service account, so even if I override the cache setting in the user config .npmrc file located at %USERPROFILE%.npmrc, this will still have all build agents using the same npm cache location (since they're all using the same account and thus use the same .npmrc file). Is there a way to specify an npm cache for each agent on the same machine, such that each agent folder could have its own nested npm-cache sub-folder (and would be used only by builds executed by that respective agent)?







node.js npm msbuild azure-devops tfs2015






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 23:39









Michael

1,1191716




1,1191716











  • did you try to run some builds at the same time and check if it doing corruption?
    – Shayki Abramczyk
    Nov 12 at 10:56










  • @ShaykiAbramczyk, I haven't tried on this current server, but I've seen it happen before on a previous build server that hosted multiple TFS XAML build agents. I'm trying to prevent that from happening this time around. :-)
    – Michael
    Nov 12 at 14:30
















  • did you try to run some builds at the same time and check if it doing corruption?
    – Shayki Abramczyk
    Nov 12 at 10:56










  • @ShaykiAbramczyk, I haven't tried on this current server, but I've seen it happen before on a previous build server that hosted multiple TFS XAML build agents. I'm trying to prevent that from happening this time around. :-)
    – Michael
    Nov 12 at 14:30















did you try to run some builds at the same time and check if it doing corruption?
– Shayki Abramczyk
Nov 12 at 10:56




did you try to run some builds at the same time and check if it doing corruption?
– Shayki Abramczyk
Nov 12 at 10:56












@ShaykiAbramczyk, I haven't tried on this current server, but I've seen it happen before on a previous build server that hosted multiple TFS XAML build agents. I'm trying to prevent that from happening this time around. :-)
– Michael
Nov 12 at 14:30




@ShaykiAbramczyk, I haven't tried on this current server, but I've seen it happen before on a previous build server that hosted multiple TFS XAML build agents. I'm trying to prevent that from happening this time around. :-)
– Michael
Nov 12 at 14:30

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244502%2fhow-to-use-npm-cache-on-server-with-multiple-build-agents%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244502%2fhow-to-use-npm-cache-on-server-with-multiple-build-agents%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

政党

天津地下鉄3号線