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

Microfocus Performance Center plugin script uploads with folders fail / folders removed after upload (eg. DevWeb script with node_modules)

XMLWordPrintable

      It was found that after moving a DevWeb script with external dependencies into a git repository and using the Jenkins to Loadrunner git integration plugin for uploading the scripts the script did not work anymore. After a lot of searching it was found that Loadrunner Enterprise did not accept the folder structure in the archive and omitted the folders.

      This fork contains a small fix that created archives that are accepted without problems.

      Changes:
      Create an 'directory entry' in the zip-file. It should not be necessary according the zip specifications but Loadrunner enterprise uploaded seems to strip folder in a script if this is not here (eg. node_modules in a DevWeb script).

      According to the zip specifications https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT section 4.4.17.1 the path separator must be a forward slash.

      All changes are in Compressor.java and are commented accordingly.

      Testing done

      A small java program was created to mimic the archive creation for the script upload.
      With unmodified code, the uploaded script did not contain the original folder structure after downloading.
      With modified code, the uploaded script after downloading did show the original folder structure.
      Running the modified archive uploaded script from a test in Loadrunner Enterprise was working without issues.

      See pull request: https://github.com/jenkinsci/micro-focus-performance-center-integration-plugin/pull/26

            danieldanan Daniel Danan
            feico_de_boer Feico
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: