search

Home  >  Q&A  >  body text

node.js - Which machine must have a node environment when Jenkins packages and builds a node project?

  1. When Jenkins packages and builds a node project, does it require the machine where Jenkins is located to have a node environment, or does it require the configured ssh remote server to have a node environment?

  2. I built Jenkins on my local machine without ssh configuration, and then the build was successful. It means that it depends on the node environment of the machine where my local Jenkins is located, so I have the above questions.

Please give me some advice! ! !

过去多啦不再A梦过去多啦不再A梦2701 days ago1084

reply all(4)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-07-06 10:36:35

    I’m not very familiar with Jenkins, but since I’ve been invited, let’s talk about my understanding. The node environment is only needed where node projects need to be run.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-07-06 10:36:35

    Jenkins is just a continuous integration environment. The node project that Jenkins executes and builds is on the machine, and that machine needs to have the node environment installed.

    reply
    0
  • 習慣沉默

    習慣沉默2017-07-06 10:36:35

    Of course your ssh server must have a node environment.

    In fact, ssh is just for remote control. It sends commands to the remote machine to perform related operations. It has nothing to do with your local environment.

    I don’t know why your build was successful. Either your remote machine already has a Node environment, or you didn’t build successfully at all. You can look at the logs, or just ssh to the remote machine yourself and go through the build process.

    reply
    0
  • 代言

    代言2017-07-06 10:36:35

    I understand, in fact, it mainly depends on which step you want to package. If npm install and npm run build scripts are written in the command executed by Jenkins itself when building, then the Jenkins machine is required to have a node environment. To do this, just send the packaged dist directory to the remote machine. The remote server only needs to decompress it to start the web service. If this script is written in the remote command, then all the source code must be sent to the remote server, and the remote server must have a node environment, so that the node tasks must be handed over to the remote server.

    reply
    0
  • Cancelreply