Jenkins使用通过SSH插件发布传输0个文件 [英] Jenkins transferring 0 files using publish over SSH plugin
问题描述
我想将文件从我的后期构建Jenkins工作区传输到远程服务器上的位置。
这是控制台输出:
由用户启动Patrick
构建在工作区/ var / lib / jenkins / jobs / 20eyes构建/工作区
从远程Git仓库获取更改
获取上游更改https://github.com/project/project.git
使用.gitcredentials设置凭证
签出版本a758e0f8e534271b999a2fc8696b6fd5a3d5e500(origin / master)
执行脚本:
cd / var / www / 20eyes-web
[SSH] exit-status:0
SSH:从主机连接[dev1.remotehost]
SSH:使用配置连接[dev2 .remotehost] ...
SSH:断开连接配置[dev2.remotehost] ...
SSH:已传输0个文件
构建步骤通过SSH发送文件或执行命令已更改构建结果到SUCCESS
完成:SUCCESS
作业配置为在任何提交后推送到GitHub
传输集为:
源文件:
/ var / lib / jenkins / jobs / 20eyes Build / workspace / ** / *
删除前缀:
/ var / lib / jenkins / jobs / 20eyes Build / workspace
解决方案我认为,问题在你的配置。
我们有2个位置进行配置。
- 在系统配置(全局配置)。
- >如果test ok ==>配置到远程服务器就可以了。
我们将关注传输集:(源文件,删除前缀,远程目录)
2.1源文件:如果它是空白=工作空间目录。
在你的情况下,我想你应该输入** / *
2.2删除前缀:refer 这是了解更多信息。
2.3远程目录:如果它是空白=配置的目录上面的系统配置。
希望它帮助!
对不起,我的英语。I want to transfer files from my post build Jenkins workspace to a location on a remote server. Build goes smoothly for all steps in the job but always transfers 0 files.
This is the console output:
Started by user Patrick Building in workspace /var/lib/jenkins/jobs/20eyes Build/workspace Fetching changes from the remote Git repository Fetching upstream changes from https://github.com/project/project.git using .gitcredentials to set credentials Checking out Revision a758e0f8e534271b999a2fc8696b6fd5a3d5e500 (origin/master) executing script: cd /var/www/20eyes-web [SSH] exit-status: 0 SSH: Connecting from host [dev1.remotehost] SSH: Connecting with configuration [dev2.remotehost] ... SSH: Disconnecting configuration [dev2.remotehost] ... SSH: Transferred 0 file(s) Build step 'Send files or execute commands over SSH' changed build result to SUCCESS Finished: SUCCESS
The job is configured to build after any commit is pushed to GitHub
The transfer set is: Source Files:
/var/lib/jenkins/jobs/20eyes Build/workspace/**/*
Remove prefix:
/var/lib/jenkins/jobs/20eyes Build/workspace
解决方案I thinks, problem at your config. We have 2 positions to configure.
- At System configuration (Global config). --> If test ok ==> Configuration to remote server is ok.
At your project. We will focus about transfer set: (Source file, Remove prefix, remote directory)
2.1 Source file : if it's blank = workspace directory. in your case i think you should input
**/*
2.2 Remove prefix : refer Here for more info.
2.3 Remote directory: if it's blank = directory that is configured at System configuration above.Hope it help! Sorry about my English.
这篇关于Jenkins使用通过SSH插件发布传输0个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!