我想将文件从我的后期构建Jenkins工作区传输到远程服务器上的某个位置。构建过程顺利进行,但始终传输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
我认为,您的配置存在问题。我们有2个职位要配置。
2.1源文件:如果为空白=工作区目录。在您的情况下,我认为您应该输入**/* 2.2删除前缀: 有关更多信息,请参见此处。 2.3远程目录:如果为空=在上面的系统配置中配置的目录。
**/*
希望对您有所帮助!对不起,我的英语。