Reputation: 461
I have a self-hosted server with Node.js 10.x installed on it. And I have several different build pipelines on the server already that depend on Node.js/npm. The last thing I want to do is break any of those builds. Now I have a new UI application that requires Node.js version 12.9.x or later.
If I use the "Node.js Tool Installer Task" in the build for my new application to install version 14.16.1 (the latest LTS version) of Node.js, will that permanently install that version of Node.js on the server therefore potentially breaking all the other build pipelines I have for all my other applications? Or is this installer task just for temporarily installing a new version of Node.js for the purposes of the specific build?
Upvotes: 0
Views: 1178
Reputation: 1006
Every time you run a new Job in your azure pipeline it's a completely new "environment", I quote environment because it can be interpreted as such, but technically it's an agent, which can be seen as a VM.
Long story short, imagine the following scenario:
- jobs:
- job: installNode10x
displayName: job1
...
- job: installNode9x
displayName: job2
Job1 runs and install Node v10 in your agent and you do some operations with it. When job2 is reached, your previous installed version of Node10 is gone, in other words, if you try to use anything from node10 in job2 your pipeline will fail because each job is independent of each other in terms of installed software, the jobs only share dependencies that are installed directly on the agent itself.
So, answering your question: No, it won't install permanently
If you want to install anything permanently you need to install it on the Agent itself. Ref.: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser
Upvotes: 1