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

Incorrect use of project.getWorkspace()

    Details

    • Similar Issues:

      Description

      If you were on GitHub I would probably just file a pull request, but since you are not, the following code in https://svn.jenkins-ci.org/trunk/hudson/plugins/copy-to-slave/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToMasterNotifier.java looks wrong:

      public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
      ...
          FilePath projectWorkspaceOnSlave = build.getProject().getWorkspace();
      

      This is likely wrong since the project can have many workspaces, and if there are concurrent builds this one may be from a different build. build.getWorkspace() is more correct, and simpler too.

        Attachments

          Activity

          Hide
          danielpetisme Daniel Petisme added a comment -

          Hi Jeesse, I've inherited of all rseguy's plugins ownership. I was a huge SVN fan :/
          Do you have any kind of procedure to move Jenkins plugin from SVN to Github. It'll ease my work too

          Do you have to raise requests for all the plugins to integrate them into the Jenkins CI organization?

          Show
          danielpetisme Daniel Petisme added a comment - Hi Jeesse, I've inherited of all rseguy's plugins ownership. I was a huge SVN fan :/ Do you have any kind of procedure to move Jenkins plugin from SVN to Github. It'll ease my work too Do you have to raise requests for all the plugins to integrate them into the Jenkins CI organization?
          Show
          kutzi kutzi added a comment - Daniel: see https://wiki.jenkins-ci.org/display/JENKINS/Moving+from+Subversion+%28svn%29+to+Github
          Hide
          danielpetisme Daniel Petisme added a comment -

          I'll try to do it before end of week...

          Show
          danielpetisme Daniel Petisme added a comment - I'll try to do it before end of week...
          Hide
          kfritsche Karl Fritsche added a comment -

          Could this also be a problem, when using variables in the custom workspace setting? See JENKINS-23308

          Show
          kfritsche Karl Fritsche added a comment - Could this also be a problem, when using variables in the custom workspace setting? See JENKINS-23308

            People

            • Assignee:
              danielpetisme Daniel Petisme
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: