Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70750

if there are two tools in Jenkinsfile they are ignored, it works with just one

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • Jenkins Version 2.394
      NodeJS Plugin Version 1.6.0
      OS: Linux - 3.10.0-1160.83.1.el7.x86_64
      Java: 11.0.18 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)

      If I have two tools defined, as in the code below. The tools are completely ignored (the version step prints the default tools). If I have just one tools defined (either jdk or nodejs) then it works fine, and that defined tool has the right version (the other one of course has the default version).

      Having two tools worked perfectly fine for years, but it fails in the recent version of Jenkins.

       

      pipeline {
          agent any
          tools {
              jdk "8u152"
              nodejs "Node LTS"
          }
          stages {
              stage('checkout') {
                  steps {
                      checkout([$class: 'GitSCM', branches: scm.branches, extensions: scm.extensions,
                      userRemoteConfigs: scm.userRemoteConfigs])
                  }
              }
              stage('Version Check') {
                  steps {
                      sh "java -version"
                      sh 'node -v'
                      sh 'npm -v'
                  }
              }
          }
      }
      

       

        1. build.xml
          21 kB
          Ariel
        2. job-config.xml
          1 kB
          Mark Waite
        3. plugins.txt
          2 kB
          Mark Waite
        4. plugins-system.txt
          5 kB
          Ariel
        5. root-config.xml
          0.5 kB
          Mark Waite
        6. run-jenkins.sh
          0.9 kB
          Mark Waite

            Unassigned Unassigned
            ars Ariel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: