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

breaking forward slash inserted in download with proget jenkins plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • inedo-proget-plugin
    • None
    • Jenkins v2.204.2 on windows and linux

      When using the download directive in the jenkins plugin, it inserts a forward slash at the start of the destination string, which breaks the download to a windows agent:

       downloadProgetPackage downloadFolder: "${WORKSPACE}/${deployLocation}", 
                            downloadFormat: 'zip',
                            feedName: 'PlatDev',
                           groupName: "Relativity/${env.appName}/${BRANCH_NAME}",
                           packageName: "${env.appName}",
                           version: 'Latest'
      
      
       ${WORKSPACE} == pwd() == D:\workspace_5649-PS-jenkins-deploy-pipeline
       ${deployLocation} == 'deploy'

       

      Result:

      [ProGet] Download package to /D:\workspace_5649-PS-jenkins-deploy-pipeline/deploy

       

      has anyone seen this, resolved it?

      I am currently working around it by using the raw url download:

      httpRequest outputFile: "${deployLocation}/${appName}.zip", 
       responseHandle: 'NONE', 
       url: 'http://proget.consilio.com/upack/PlatDev/download/Relativity/ProcessingSync/PLATDEV-5649-PS-jenkins-deploy-pipeline/ProcessingSync?latest&contentOnly=zip'

          [JENKINS-61299] breaking forward slash inserted in download with proget jenkins plugin

          Andrew Sumner added a comment -

          Which version of the plugin? I've just released version 1.4 so wondering if I made a breaking change - not that I should have changed anything in that area.  It might take me a couple of days to get to the bottom of this - just moved and have yet to get development environment up and running again.

          Andrew Sumner added a comment - Which version of the plugin? I've just released version 1.4 so wondering if I made a breaking change - not that I should have changed anything in that area.  It might take me a couple of days to get to the bottom of this - just moved and have yet to get development environment up and running again.

          Max Cascone added a comment - - edited

          I'm on 1.3 on both my local and production instances.

          Max Cascone added a comment - - edited I'm on 1.3 on both my local and production instances.

          Andrew Sumner added a comment -

          Finally back up and running, would love to say I've finished unpacking, but still lots to do 

          I've tried a number of different combinations and haven't been able to duplicate your issue.  This is the latest incarnation of my script, can you try it out (you might need to update feed name, etc) and let me know what happens?

           
          node {
              bat '''
                  DEL *.TXT /Q
                  DEL *.upack /Q
                  ECHO Build Tag: %BUILD_TAG% > Example.txt
              '''
             
              script

          {       deployLocation = "deploy"     }

             
              uploadProgetPackage artifacts: 'Example.txt', feedName: 'Example', groupName: 'jenkins/pipleline', packageName: 'JenkinsPackage', version: "1.0.${BUILD_NUMBER}"
              downloadProgetPackage downloadFolder: "${WORKSPACE}/${deployLocation}", downloadFormat: 'pkg', feedName: 'Example', groupName: 'jenkins/pipleline', packageName: 'JenkinsPackage', version: "1.0.${BUILD_NUMBER}"
          }
           

          Andrew Sumner added a comment - Finally back up and running, would love to say I've finished unpacking, but still lots to do  I've tried a number of different combinations and haven't been able to duplicate your issue.  This is the latest incarnation of my script, can you try it out (you might need to update feed name, etc) and let me know what happens?   node {     bat '''         DEL *.TXT /Q         DEL *.upack /Q         ECHO Build Tag: %BUILD_TAG% > Example.txt     '''         script {       deployLocation = "deploy"     }         uploadProgetPackage artifacts: 'Example.txt', feedName: 'Example', groupName: 'jenkins/pipleline', packageName: 'JenkinsPackage', version: "1.0.${BUILD_NUMBER}"     downloadProgetPackage downloadFolder: "${WORKSPACE}/${deployLocation}", downloadFormat: 'pkg', feedName: 'Example', groupName: 'jenkins/pipleline', packageName: 'JenkinsPackage', version: "1.0.${BUILD_NUMBER}" }  

          Max Cascone added a comment -

          Is not an issue in recent versions of the plugin.

          Max Cascone added a comment - Is not an issue in recent versions of the plugin.

            andrewsumner Andrew Sumner
            mcascone Max Cascone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: