我想将文件从我的发布版本Jenkins工作区传输到远程服务器上的某个位置。构建工作顺利进行,但总是传输0个文件。Jenkins使用SSH插件发布传输0个文件
这是控制台输出:
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
作业被配置为建立之后的任何承诺推到GitHub上
换乘的是: 源文件:
/var/lib/jenkins/jobs/20eyes Build/workspace/**/*
删除前缀:
/var/lib/jenkins/jobs/20eyes Build/workspace
去那里你会找到答案https://stackoverflow.com/a/48842747/8327498 – kprocks