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

Existence check for MsBuild.exe does not account for non-master nodes

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • msbuild-plugin
    • None
    • Platform: All, OS: All

    Description

      The check for the existence of the MsBuild executable in the perfrom() method
      only checks on the master; the check must be extended to also include the node
      the current job is tied to.

      Attachments

        Activity

          tpijl tpijl added a comment -

          When executing the build on a slave the output is:

          Started by user anonymous
          Building remotely on bem1-slave
          Updating http://nlbalevl1/svn/nltech/trunk/Adapter4ERP
          At revision 135
          no change for http://nlbalevl1/svn/nltech/trunk/Adapter4ERP since the previous build
          FATAL: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe doesn't exist
          Finished: FAILURE
          

          although the MSBuild.exe is in the given directory on the slave.

          tpijl tpijl added a comment - When executing the build on a slave the output is: Started by user anonymous Building remotely on bem1-slave Updating http: //nlbalevl1/svn/nltech/trunk/Adapter4ERP At revision 135 no change for http: //nlbalevl1/svn/nltech/trunk/Adapter4ERP since the previous build FATAL: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe doesn't exist Finished: FAILURE although the MSBuild.exe is in the given directory on the slave.
          sweeney Tony Sweeney added a comment -

          Plugin should only check on the build slave – we run a Linux master and Windows slaves, so any check on the master is doomed to failure.

          sweeney Tony Sweeney added a comment - Plugin should only check on the build slave – we run a Linux master and Windows slaves, so any check on the master is doomed to failure.

          Patch attached that fixes this issue. I altered the check so that it uses a FilePath object to check for the existance of the msbuild executable. The channel from the launcher references the node doing the build so the check gets performed on the slave.

          oldelvet Richard Mortimer added a comment - Patch attached that fixes this issue. I altered the check so that it uses a FilePath object to check for the existance of the msbuild executable. The channel from the launcher references the node doing the build so the check gets performed on the slave.
          karljp karljp added a comment -

          Patch verified with hudson 388.

          Can we get this committed already?

          karljp karljp added a comment - Patch verified with hudson 388. Can we get this committed already?
          adwmayer adwmayer added a comment -

          It seems that kdsweeney hasn't been active and the patch for this bug has already been submitted. It just needs to be committed. This is a major bug preventing anyone using a Linux master or a Windows master with a different version of .Net from using the plugin. Do you have the time to deal with this or can you assign it to someone who does?

          adwmayer adwmayer added a comment - It seems that kdsweeney hasn't been active and the patch for this bug has already been submitted. It just needs to be committed. This is a major bug preventing anyone using a Linux master or a Windows master with a different version of .Net from using the plugin. Do you have the time to deal with this or can you assign it to someone who does?

          Code changed in jenkins
          User: Gregory
          Path:
          pom.xml
          src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java
          src/main/java/hudson/plugins/msbuild/MsBuildInstallation.java
          src/main/resources/index.jelly
          http://jenkins-ci.org/commit/msbuild-plugin/20ca9e01c60326098990033509c3d6434b41e708
          Log:
          Fixed JENKINS-4121

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Path: pom.xml src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java src/main/java/hudson/plugins/msbuild/MsBuildInstallation.java src/main/resources/index.jelly http://jenkins-ci.org/commit/msbuild-plugin/20ca9e01c60326098990033509c3d6434b41e708 Log: Fixed JENKINS-4121

          I tested msbuild-plugin version 1.4 and can confirm that the issue is resolved in that release.

          Thanks for pulling the patch in Gregory.

          oldelvet Richard Mortimer added a comment - I tested msbuild-plugin version 1.4 and can confirm that the issue is resolved in that release. Thanks for pulling the patch in Gregory.

          People

            gbois Gregory Boissinot
            schtefan Stefan
            Votes:
            11 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: