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

Please add support for jenkins pipeline plugin to publish-over-ssh

      Please add support for the Jenkins Workflow plugin. Thanks!

          [JENKINS-27963] Please add support for jenkins pipeline plugin to publish-over-ssh

          Code changed in jenkins
          User: Alex Earl
          Path:
          pom.xml
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshHostConfiguration.java
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshPromotionPublisherPlugin.java
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin.java
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshTransfer.java
          src/main/java/jenkins/plugins/publish_over_ssh/descriptor/BapSshPublisherDescriptor.java
          src/main/java/jenkins/plugins/publish_over_ssh/descriptor/BapSshTransferDescriptor.java
          http://jenkins-ci.org/commit/publish-over-ssh-plugin/8a78eeb871f60cbfe37a05db1e95500c48badc60
          Log:
          Fix JENKINS-27963

          Added @Symbol annotations and cleaned up the constructors a bit.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/jenkins/plugins/publish_over_ssh/BapSshHostConfiguration.java src/main/java/jenkins/plugins/publish_over_ssh/BapSshPromotionPublisherPlugin.java src/main/java/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin.java src/main/java/jenkins/plugins/publish_over_ssh/BapSshTransfer.java src/main/java/jenkins/plugins/publish_over_ssh/descriptor/BapSshPublisherDescriptor.java src/main/java/jenkins/plugins/publish_over_ssh/descriptor/BapSshTransferDescriptor.java http://jenkins-ci.org/commit/publish-over-ssh-plugin/8a78eeb871f60cbfe37a05db1e95500c48badc60 Log: Fix JENKINS-27963 Added @Symbol annotations and cleaned up the constructors a bit.

          Ed Lomonaco added a comment -

          I'm taking a guess this should be available in the very near future?

          Ed Lomonaco added a comment - I'm taking a guess this should be available in the very near future?

          Alex Earl added a comment -

          Yes, I'll be doing a release this week.

          Alex Earl added a comment - Yes, I'll be doing a release this week.

          Alex Earl added a comment -

          Fixed in 1.19

          Alex Earl added a comment - Fixed in 1.19

          Very quickly tested this 1.19 and seams to work OK in pipeline and freestyle jobs. Thanks!

          Tapio Reijonen added a comment - Very quickly tested this 1.19 and seams to work OK in pipeline and freestyle jobs. Thanks!

          Stephan Watermeyer added a comment - - edited

          slide_o_mix: First test was also successful here. Still have two entries in the DropDown List:

          Further: Would it be possible to get the _configNamevalue _from a variable? Currently i need to hardcode this value in my pipeline...

          sshPublisher(publishers: [sshPublisherDe sc(configName: 'swpsci06', transfers: [sshTransfer(execCommand: '', execTimeout: 120000, sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])

          I would like to do something like. The variable "ReleaseNumber" is getting populate from my paramterized build.

          #!/usr/bin/env groovy
          
          def call(Map params = [:]) {
          	def serverHostname = "swpsws26"
          	
          	 pipeline {
          		agent any
          		
          		stages {
          			stage('Download') {
          				steps {
          					sshPublisher(publishers: [sshPublisherDesc(configName: $serverHostname, transfers: [sshTransfer(execCommand: '''
          						echo "INFO: Downloading $filename from $ReleaseNumber"
          						echo "INFO: $serverHostname"
          					''', execTimeout: 120000, sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
          				}
          			}
          		}
          	}
          }
          
          

          Stephan Watermeyer added a comment - - edited slide_o_mix : First test was also successful here. Still have two entries in the DropDown List: Further: Would it be possible to get the _configNamevalue _from a variable? Currently i need to hardcode this value in my pipeline... sshPublisher(publishers: [sshPublisherDe sc(configName: 'swpsci06' , transfers: [sshTransfer(execCommand: '', execTimeout: 120000, sourceFiles: ' ')], usePromotionTimestamp: false , useWorkspaceInPromotion: false , verbose: false )]) I would like to do something like. The variable "ReleaseNumber" is getting populate from my paramterized build. #!/usr/bin/env groovy def call(Map params = [:]) { def serverHostname = "swpsws26" pipeline { agent any stages { stage( 'Download' ) { steps { sshPublisher(publishers: [sshPublisherDesc(configName: $serverHostname, transfers: [sshTransfer(execCommand: ''' echo "INFO: Downloading $filename from $ReleaseNumber" echo "INFO: $serverHostname" ''', execTimeout: 120000, sourceFiles: ' ')], usePromotionTimestamp: false , useWorkspaceInPromotion: false , verbose: false )]) } } } } }

          Gemor Roj added a comment - - edited

          after 1.19 settings are not saving (1.18 works fine).

          • Remove prefix
          • Remote directory

          this is important regression

          Gemor Roj added a comment - - edited after 1.19 settings are not saving ( 1.18 works fine). Remove prefix Remote directory this is important regression

          Sorin Sbarnea added a comment -

          As of latest version of the plugin and Jenkins (LTS) 2.89.4 this plugin does not expose any pipeline functionality.

          /pipeline-syntax/ - does not contain any ssh function listed (ticket screenshot is outdated because now the dropdown contains function names)

          /pipeline-syntax/html – does not contain any "ssh" occurence

          Jenkins log does not report any errors or warnings related to ssh plugin, and it was restarted after installation.

          Sorin Sbarnea added a comment - As of latest version of the plugin and Jenkins (LTS) 2.89.4 this plugin does not expose any pipeline functionality. /pipeline-syntax/ - does not contain any ssh function listed (ticket screenshot is outdated because now the dropdown contains function names) /pipeline-syntax/html – does not contain any "ssh" occurence Jenkins log does not report any errors or warnings related to ssh plugin, and it was restarted after installation.

          Alex Earl added a comment -

          gemorroj Please open a new issue.

          ssbarnea I am not able to reproduce your issue. I've attached my screenshot of running under 2.89.4 and using the pipeline syntax to generate snippets.

          Alex Earl added a comment - gemorroj Please open a new issue. ssbarnea I am not able to reproduce your issue. I've attached my screenshot of running under 2.89.4 and using the pipeline syntax to generate snippets.

          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/160
          And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-27963%22

          (Note: this is an automated bulk comment)

          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/160 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-27963%22 (Note: this is an automated bulk comment)

            slide_o_mix Alex Earl
            fishnix E Camden Fisher
            Votes:
            38 Vote for this issue
            Watchers:
            50 Start watching this issue

              Created:
              Updated:
              Resolved: