简体   繁体   English

在Hudson / Jenkins中获得构建步骤的结果,以在另一步骤中重复使用它

[英]Get result of a build step in Hudson/Jenkins to re-use it in another one

My question may be silly but I've been trying several ways and I still can't do what I want, ie: 我的问题可能很愚蠢,但我一直在尝试几种方法,但仍然无法做我想做的事,即:

  • use the scp target of Ant to target a remote machine and execute a script there 使用Ant的scp目标来定位远程计算机并在那里执行脚本
  • this script creates a dynamic list of files 该脚本创建文件动态列表
  • get this list of files (only their names) back in Hudson to use it in the next build step (another scp from Ant) 在Hudson中获取此文件列表(仅文件名),以在下一步构建步骤中使用它(来自Ant的另一个scp)

I tried to use environment variables but they are interpreted by Hudson so I'm stuck here... 我尝试使用环境变量,但是它们由Hudson解释,所以我被困在这里...

Globally my question would be: how to get a result from an Ant build step ? 在全球范围内,我的问题是:如何从Ant构建步骤中获得结果?

Thanks for your ideas, 谢谢你的想法

Emmanuel 伊曼纽尔

You may find File parameter useful. 您可能会发现File参数很有用。 This allows you to create an input file, pass it to build. 这使您可以创建输入文件,并将其传递给构建。 You may need to write script/ant script to process the file though. 但是,您可能需要编写脚本/蚂蚁脚本来处理文件。

In the long term you may evaluate a Hudson farm. 从长远来看,您可以评估哈德逊农场。 This will allow to create tasks that span multiple machines , pass results around. 这将允许创建跨多台计算机的任务,并传递结果。 (https://wiki.jenkins-ci.org/display/JENKINS/Plugins) (https://wiki.jenkins-ci.org/display/JENKINS/Plugins)

您可以通过API获取触发您的工作的工作ID,并获取其状态。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM