formation 2 年之前
父节点
当前提交
077312cc0a
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 3 6
      Jenkinsfile

+ 3 - 6
Jenkinsfile

@@ -1,11 +1,8 @@
 node{ 
 node{ 
    stage('Prepare Node and NPM') { // confirm nodejs plugin and setting
    stage('Prepare Node and NPM') { // confirm nodejs plugin and setting
-   env.NODEJS_HOME = "${tool 'NodeJS'}"
-    //on linux / mac
-    env.PATH="${env.NODEJS_HOME}/bin:${env.PATH}"
-    // on windows
-    // env.PATH="${env.NODEJS_HOME};${env.PATH}"
-    sh 'npm --version'
+    tools {
+        nodejs "NodeJS"
+    }
    
    
    }
    }