how to run npm/grunt command from jenkins

前端 未结 2 988
长情又很酷
长情又很酷 2020-12-17 08:57

I\'m new to this area and was trying to run the following commands from jenkins:

npm install
grunt quickStart

So far I\'ve a jenkins runnin

2条回答
  •  无人及你
    2020-12-17 09:09

    "its asking me to to add one or mode nodeJs installation and I could not find those setting and not even sure if I even need them in the first place."
    I don't think you need that I have pointed jenkins to the node installation folder an nothing more.., for this you go to Manage Jenkins->Configure System->NodeJS->NodeJS installations.. type in any name you like and point to where the node home folder is.

    node home directory ...cannot see this setting for the jenkins job I create...

    Once you have configure that in your jenkins configuration you should have that configuration available like so:

    node in project

    ...Is there an easy way to run those command in jenkins from a .bat or .sh script, a .bat would be recomended since I'm on window machine
    I'm sorry don't get what commands are you referring to... so summarizing :

    1. you have to tell jenkins where you have your node installation
    2. use that configuration in your jobs

    hope this helps...

提交回复
热议问题