Using a script from the plugin demo tailored for my environment, but get a JAVA_HOME error...
Running: Install a tool Running: Dev Entering stage Dev Proceeding Running: Shell Script [WPG-TOOLS-WORKFLOW] Running shell script + mvn -o clean package which: no javac in (/opt/jenkins/slave/tools/Maven/apache-maven-3.2.5/bin:/usr/local/bin:/bin:/usr/bin) which: no java in (/opt/jenkins/slave/tools/Maven/apache-maven-3.2.5/bin:/usr/local/bin:/bin:/usr/bin) Error: JAVA_HOME is not defined correctly. We cannot execute Running: Allocate node : Body : End Running: Allocate node : End Running: End of Workflow ERROR: script returned exit code 1Finished <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE My workflow script is very simple... node('slave') { git url: '***********************' env.PATH="${tool 'Maven 3.2.5'}/bin:${env.PATH}" stage 'Dev' sh 'mvn -o clean package' stage 'QA' parallel(SonarQube: { }) } input message: "Does http://localhost:8080/staging/ look good?" try { checkpoint('Before production') } catch (NoSuchMethodError _) { echo 'Checkpoint feature available in Jenkins Enterprise by CloudBees.' } My existing Maven jobs work well, but they use Jenkins to define the JDK. Does this mean that for the Workflow plugin I need to know where Java is installed? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/949abb4a-6b37-4fda-a2e9-4d651730684c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
