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

[Regression] Remove prefix and remote directory are not persisted anymore

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • Jenkins 2.89.4, Publish Over SSH 1.19

    Description

      I have a freestyle job that publish over SSH some artifacts using "remove prefix" and "remote directory" valued. With the plugin version 1.17 it works great.
      Updating to 1.19 everytime I edit the job configuration both fields are empty also if valued (are not persistend on save) and subsequently any run fails.

      Before:

      <jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin plugin="publish-over-ssh@1.17">
        <consolePrefix>SSH: </consolePrefix>
        <delegate>
          <publishers>
            <jenkins.plugins.publish__over__ssh.BapSshPublisher>
              <configName>machine01.acme.com</configName>
              <verbose>false</verbose>
              <transfers>
                <jenkins.plugins.publish__over__ssh.BapSshTransfer>
                  <remoteDirectory>build</remoteDirectory>
                  <sourceFiles>target/*.tar.gz,wealth/target/db/**/*</sourceFiles>
                  <excludes />
                  <removePrefix>target</removePrefix>
                  <remoteDirectorySDF>false</remoteDirectorySDF>
                  <flatten>false</flatten>
                  <cleanRemote>false</cleanRemote>
                  <noDefaultExcludes>false</noDefaultExcludes>
                  <makeEmptyDirs>false</makeEmptyDirs>
                  <patternSeparator>[, ]+</patternSeparator>
                  <execCommand />
                  <execTimeout>120000</execTimeout>
                  <usePty>false</usePty>
                  <useAgentForwarding>false</useAgentForwarding>
                </jenkins.plugins.publish__over__ssh.BapSshTransfer>
              </transfers>
              <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
              <usePromotionTimestamp>false</usePromotionTimestamp>
            </jenkins.plugins.publish__over__ssh.BapSshPublisher>
          </publishers>
        </delegate>
      </jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin>
      

      After:

      <jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin plugin="publish-over-ssh@1.19">
        <consolePrefix>SSH: </consolePrefix>
        <delegate plugin="publish-over@0.21">
          <publishers>
            <jenkins.plugins.publish__over__ssh.BapSshPublisher plugin="publish-over-ssh@1.19">
              <configName>machine01.acme.com</configName>
              <verbose>false</verbose>
              <transfers>
                <jenkins.plugins.publish__over__ssh.BapSshTransfer>
                  <sourceFiles>target/*.tar.gz,target/db/**/*</sourceFiles>
                  <remoteDirectorySDF>false</remoteDirectorySDF>
                  <flatten>false</flatten>
                  <cleanRemote>false</cleanRemote>
                  <noDefaultExcludes>false</noDefaultExcludes>
                  <makeEmptyDirs>false</makeEmptyDirs>
                  <execCommand />
                  <execTimeout>120000</execTimeout>
                  <usePty>false</usePty>
                  <useAgentForwarding>false</useAgentForwarding>
                </jenkins.plugins.publish__over__ssh.BapSshTransfer>
              </transfers>
              <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
              <usePromotionTimestamp>false</usePromotionTimestamp>
            </jenkins.plugins.publish__over__ssh.BapSshPublisher>
          </publishers>
        </delegate>
      </jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin>
      

      Attachments

        Issue Links

          Activity

            nfalco Nikolas Falco added a comment -

            I had also try with pipeline without luck. The removePrefix is ignored.

            stage('Deploy') {
              sshPublisher(publishers:
                [sshPublisherDesc(
                  configName: 'machine01.acme.com',
                  transfers: [
                    sshTransfer(execCommand: '', sourceFiles: 'target/*.tar.gz, target/db/**/*', removePrefix: 'target', remoteDirectorySDF: '~'),
                    sshTransfer(execCommand: 'cd ~;chmod +x *.sh;./deploy.sh', sourceFiles: 'scripts/*', removePrefix: 'scripts', remoteDirectorySDF: '~')
                  ])]
              )
            }
            
            nfalco Nikolas Falco added a comment - I had also try with pipeline without luck. The removePrefix is ignored. stage( 'Deploy' ) { sshPublisher(publishers: [sshPublisherDesc( configName: 'machine01.acme.com' , transfers: [ sshTransfer(execCommand: '', sourceFiles: ' target /*.tar.gz, target/db/**/ * ', removePrefix: ' target ', remoteDirectorySDF: ' ~'), sshTransfer(execCommand: 'cd ~;chmod +x *.sh;./deploy.sh' , sourceFiles: 'scripts/*' , removePrefix: 'scripts' , remoteDirectorySDF: '~' ) ])] ) }

            For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues

            Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/108
            And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-49957%22

            (Note: this is an automated bulk comment)

            gmcdonald Gavin McDonald added a comment - For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/108 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-49957%22 (Note: this is an automated bulk comment)

            People

              slide_o_mix Alex Earl
              nfalco Nikolas Falco
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: