詹金斯0文件生成后公布 [英] Jenkins 0 files published after build

查看:229
本文介绍了詹金斯0文件生成后公布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个詹金斯服务器设置了两个职位

I have a Jenkins server setup with two jobs

第一份工作调查develop分支,并构建詹金斯服务器上的项目。然后,我有另一种作业轮询分公司生产这种建立在另一个詹金斯奴隶是临时服务器这个分支。这项工作是配置,以便在一个成功的构建应该通过ssh公布的文物到生产服务器。

first job polls the develop branch and builds the project on the jenkins server. i then have another job that polls the production branch this builds this branch on another jenkins slave which is the staging server. This job is configured so that on a successful build it should publish the artefacts over ssh to the production server.

所有SSH密钥设置和临时服务器连接到生产服务器,但0文件传输

All the SSh keys are setup and the staging server connects to production server but 0 files are transferred

using GIT_SSH to set credentials Bitbucket Repo

using .gitcredentials to set credentials
Checking out Revision 89874cc01a9f669df69817b1049b1ab98ecb19d3 (origin/Production)

SSH: Connecting from host [nginx-php-fastcgi]
SSH: Connecting with configuration [AmazonAWS] ...

SSH: Disconnecting configuration [AmazonAWS] ...
SSH: Transferred 0 file(s)
Finished: SUCCESS

我检查了临时工作空间和文件正在修建那里,只是没有送到督促服务器。任何建议??

I checked the staging workspace and files are being built there, just not sent to the prod server. Any suggestions??

我也尝试了不同的删除preFIX的建议波纹管和这里的Jenkins传输0个文件发布使用通过SSH插件

i have also tried a different remove prefix as suggested bellow and here Jenkins transferring 0 files using publish over SSH plugin

推荐答案

您应该删除 / * 删除preFIX

编辑:结果
您的<大骨节病>源文件不能作业的工作区之外。如果你的文件在工作区的根,只需将其设置为 * 来传输所有的工作区文件,或 ** / * 包含子目录。否则指定相模式 $ {WORKSPACE}


Your Source files cannot be outside of the job's workspace. If your files are in the root of workspace, just set it to * to transfer all workspace files, or **/* to include subdirectories. Else specify a pattern relative to ${WORKSPACE}.

即使加入了领先的 / 将无法逃避,因为它所做的是追加,为工作区,在你的情况下,它变成 $ {WORKSPACE } /无功/网络/工作区/ OPMS分期服务器。即使使用父目录 ../ 将不起作用。这是出于安全顾虑,否则工作配置器可以传送私人文件从詹金斯服务器。

Even adding a leading / will not escape that, as all it does is append that to workspace, in your case it becomes ${WORKSPACE}/var/www/workspace/opms-staging-server. Even using parent directory ../ will not work. This is for security concerns, else a job configurer could transfer private files off the Jenkins server.

如果您需要从另一个作业获取文件,你需要使用复制文物生成步骤。告诉我,如果这是你的情况,我会进一步解释。

If you need to get files from another job, you need to use Copy Artifacts build step. Tell me if that's your case, and I will explain further.

这篇关于詹金斯0文件生成后公布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆