installing node on jenkins 2.0 using the pipeline plugin

前端 未结 3 865
挽巷
挽巷 2021-02-20 11:28

I am running the following docker image jenkinsci/jenkins:2.0-rc-1 to try out jenkins 2.0, and the \"pipeline\" view.

I can\'t seem to install node. Here\'s

3条回答
  •  借酒劲吻你
    2021-02-20 12:02

    For me work next code:

    node(){
      def nodeHome = tool 'nodejs5'
      env.PATH="${env.PATH}:${nodeHome}/bin"
      ...
      sh 'npm install'
    }
    

    nodejs5 is the name of the tool specified in Jenkins configuration.

提交回复
热议问题