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

The sourceFiles property is ignored. This causes an error when uses in combination of removePrefix

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.107.2
      Publish Over CIFS 0.10
      Windows Server 2016
    • Similar Issues:

      Description

      When I execute a publish to a CIFS share with the following command in the Jenkinsfile (in the root of the project in Subversion):

       

      cifsPublisher(publishers: [[configName: 'Published_prerelease', transfers: [[cleanRemote: false, excludes: '', flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '', remoteDirectory: '$\{BUILD_TAG}/pls', remoteDirectorySDF: false, removePrefix: 'output/pls', sourceFiles: 'output/pls/'],

       [cleanRemote: false, excludes: '', flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '', remoteDirectory: '$\{BUILD_TAG}/src', remoteDirectorySDF: false, removePrefix: 'sources/progress', sourceFiles: 'sources/progress/bmp*/**'],

       [cleanRemote: false, excludes: '', flatten: true, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '', remoteDirectory: '$\{BUILD_TAG}/wrx', remoteDirectorySDF: false, removePrefix: 'sources/progress', sourceFiles: 'sources/progress/src*/**.wrx']],

      usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false]])

       

      Then I get the following error on execute:

       ERROR: Exception when publishing, exception message [Failed to remove prefix from file named [Jenkinsfile]. Prefix [output/pls/] must be present in all file paths]

        Attachments

          Activity

          Show
          slide_o_mix Alex Earl added a comment - Ilya Tretyakov it3xl You can try the HPI file from here: https://ci.jenkins.io/job/Plugins/job/publish-over-cifs-plugin/job/master/lastSuccessfulBuild/artifact/target/publish-over-cifs.hpi
          Hide
          it3xl Ilya Tretyakov it3xl added a comment - - edited

          I've changed META-INF and WEB-INF by those from .hpi and have restarted my Jenkins.
          I've removed the comma from the "Pattern separator" field.

          CIFS: Connecting from host [myServer]
          CIFS: Connecting with configuration [MyShare] ...
          CIFS: Disconnecting configuration [MyShare] ...
          ERROR: Exception when publishing, exception message [Failed to remove prefix from file named [a/b/c]. Prefix [a/d/e] must be present in all file paths]
          Build step 'Send build artifacts to a windows share' changed build result to UNSTABLE
          Finished: UNSTABLE
          
          Show
          it3xl Ilya Tretyakov it3xl added a comment - - edited I've changed META-INF and WEB-INF by those from .hpi and have restarted my Jenkins. I've removed the comma from the "Pattern separator" field. CIFS: Connecting from host [myServer] CIFS: Connecting with configuration [MyShare] ... CIFS: Disconnecting configuration [MyShare] ... ERROR: Exception when publishing, exception message [Failed to remove prefix from file named [a/b/c]. Prefix [a/d/e] must be present in all file paths] Build step 'Send build artifacts to a windows share' changed build result to UNSTABLE Finished: UNSTABLE
          Hide
          slide_o_mix Alex Earl added a comment -

          You can install hpi files via the advanced option in the plugin manager

          Show
          slide_o_mix Alex Earl added a comment - You can install hpi files via the advanced option in the plugin manager
          Hide
          it3xl Ilya Tretyakov it3xl added a comment - - edited

          Ready. I got the same result for

          About Publish Over CIFS 0.12-SNAPSHOT (private-blaBla-jenkins)
          Show
          it3xl Ilya Tretyakov it3xl added a comment - - edited Ready. I got the same result for About Publish Over CIFS 0.12-SNAPSHOT ( private -blaBla-jenkins)
          Hide
          it3xl Ilya Tretyakov it3xl added a comment - - edited

          I got something interesting.
          After all this manipulations I've went to my another job and added there "Send build artifacts to a windows share" again. And now the "Pattern separator" field isn't empty and contains

          [, ]+

          Everything is working now for

          Publish Over CIFS 0.11
          Show
          it3xl Ilya Tretyakov it3xl added a comment - - edited I got something interesting. After all this manipulations I've went to my another job and added there "Send build artifacts to a windows share" again. And now the "Pattern separator" field isn't empty and contains [, ]+ Everything is working now for Publish Over CIFS 0.11

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bctrdw Roel de Wildt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: