简体   繁体   English

使用Jenkins参数化远程触发插件“with File参数上传到远程降级Jenkins作业

[英]Use Jenkins Parameterized Remote Trigger Plugin" with File parameter to upload to the remote downsteream Jenkins job

Question: 题:

Does anyone use or have experience with the "Jenkins Parameterized Remote Trigger Plugin" to run a Jenkins job remotely from another Jenkins instance and that job has a File parameter as one of the parameters? 有没有人使用或有使用“Jenkins参数化远程触发器插件”的经验从另一个Jenkins实例远程运行Jenkins作业,并且该作业有一个File参数作为参数之一?


Background: 背景:

In the build section of the upstream parent job, I choose "Triggered a remotely parameterized job" option in the drop down menu of "Add build step" option. 在上游父作业的构建部分中,我在“添加构建步骤”选项的下拉菜单中选择“触发远程参数化作业 选项。 That job has a text edit field for "Parameters" where I have the following 该作业有一个“参数”的文本编辑字段,我有以下内容

EMAIL=$email

AnyAppInstaller.ipa=${WORKSPACE}/AnyAppInstaller.ipa

where the first parameter is a "String" parameter and the 2nd parameter is a "File" parameter 其中第一个参数是“String”参数,第二个参数是“File”参数

In the downstream job executed remotely on a different Jenkins master, I do see the value of the "String" 1st parameter but for the "File" 2nd parameter of the .ipa , I don't see that file get transferred from the upstream job to the remotely downstream job. 在不同的Jenkins主机上远程执行的下游作业中,我确实看到了“String”第一个参数的值,但对于.ipa“File”第二个参数,我没有看到该文件从上游作业转移到远程下游工作。

What is the way for me to transfer that file from the upstream job to the remotely triggered downstream job? 我将该文件从上游作业传输到远程触发的下游作业的方式是什么?

I have used the "Jenkins Parameterized Trigger Plugin" to call a downstream job within the same Jenkins instance as the upstream job and it had the option to pass in the File parameter and transfer that file from the upstream job to the downstream job using the 我使用“Jenkins参数化触发器插件”来调用与上游作业相同的Jenkins实例中的下游作业,并且它可以选择传入File参数并使用该文件从上游作业传输该文件到下游作业

"Add PametersFactories==>For every matching file, invoke a build"

Here is description of that option: 以下是该选项的说明:

"Look for files that match the specified pattern in the current build, then for each of them trigger a build of the specified project(s) by passing that file as a file parameter. This implementation does not interpret the contents of those files, and instead it simply gets passed and placed into the workspace of the triggered project(s) under the name specified here. This is useful, for example, when you have a portion of the job that can be split into concurrently executable subtasks. In such a situation, you can have an earlier step produce subtask work units by packaging necessary stuff into individual files, then use this mode to execute them all in parallel" “查找与当前版本中指定模式匹配的文件,然后通过将该文件作为文件参数传递来触发指定项目的构建。此实现不会解释这些文件的内容,并且相反,它只是被传递并以此处指定的名称放入触发项目的工作空间中。这很有用,例如,当您有一部分作业可以拆分为可并发的可执行子任务时。情况,您可以通过将必要的东西打包到单个文件中来生成子任务工作单元,然后使用此模式并行执行它们“

It seems the "Jenkins Parameterized Remote Trigger Plugin" doesn't have that option. 似乎“Jenkins参数化远程触发插件”没有该选项。

Is it a limitation of the plugin? 这是插件的限制吗?

This is a limitation of Parameterized Remote Trigger Plugin . 这是参数化远程触发插件的限制。 It passes parameters as string and doesn't create multipart HTTP request to handle file upload. 它将参数作为字符串传递,并且不创建处理文件上载的多部分HTTP请求。

Instead, I'd suggest to try one of the following plugins: 相反,我建议尝试以下插件之一:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用jenkins参数化远程触发插件 - not able to use jenkins Parameterized Remote Trigger Plugin 参数化的远程触发器未触发远程詹金斯作业 - Parameterized Remote Trigger is not triggering the remote jenkins job 如何在 Jenkins Pipeline 脚本中使用“参数化远程触发器插件”? - How to use “Parameterized Remote Trigger Plugin” in Jenkins Pipeline script? 使用参数化触发器插件的Jenkins远程构建失败 - Jenkins remote build with Parameterized Trigger Plugin failed 如何为jenkins参数化的远程触发器插件设置远程主机 - how to setup remote host for jenkins parameterized remote trigger plugin 如何根据来自 Build Failure Analyzer Jenkins 插件的错误类别发送电子邮件/触发参数化远程作业? - How to send email/trigger parameterized remote job based on error category from Build Failure Analyzer Jenkins plugin? Jenkins 参数化远程触发器插件返回错误构建的状态 - Jenkins Parameterized Remote Trigger Plugin Returning the Status of the Wrong Build Jenkins参数化远程触发器插件以返回内部版本号 - Jenkins Parameterized Remote Trigger Plugin to return build number 使用凭据触发远程 jenkins 作业 - Trigger remote jenkins job with credentials 詹金斯可以在远程詹金斯上找到一份工作 - Can one Jenkins Trigger a job on a remote jenkins
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM