Publish Over jenkins plug of using SSH

1, the installation

In the Plugin Manager search options Publish Over SSH , and click Install to complete

2, after the installation is complete, can be found in the Publish Over SSH configuration system jenkins

 

 

 

 

 

 After completion of the configuration server, and then post build actions in the project selection send files or xecute commands over SSH

 

 

 

 

 

 Description:

source files is ready to upload a file, the file is a directory relative to the workspace of the project, which is $ JENKINS_HOME / workspace / xxxx / Every project is automatically created at build time worksapce

 

 For example, I want to upload

$JENKINS_HOME/workspace/xxxx/target/class/helloworld1.java

$JENKINS_HOME/workspace/xxxx/target/class/helloworld2.java 

Then we can set the following parameters

source files=target/class/*.java

remove prefix = target (remove prefix must be the source files in the specified directory, if you do not write that this directory hierarchy is uploaded, if the write target, to pass class directory level, if the write target / class to pass * .java files )

remote diretory = rd (remote diretory is relative to the system configuration of the server configuration for remote diretory, such as remote diretory in the server configuration if it is empty, it should be the home directory, if not empty, if it is / usr / local)

That this upload in the past, there is the server's file directory is    /usr/local/rd/class/*.java

That is,    the server configuration in the Diretory Remote [ / usr / local ] + configured here Diretory Remote [RD] + Source Files directory remove prefix to remove the rest of [ class / *. The Java ]

 

Guess you like

Origin www.cnblogs.com/happyuu-2019/p/11433859.html