如何在詹金斯中使用上游项目的工件?
我想在 Jenkins 构建管道中部署来自上游项目的 EAR 文件,其中文件名是使用 jenkins 环境变量动态生成的,例如
myEar_2011-11-08_14-21-06_521.ear
然后将文件存档。如何在实际部署的下游项目中引用此文件?我看到“我在“名称”中输入什么”选项
This build is parameterized :
Build selector for Copy Artifact
Name - ???
Default Selector - Upstream build that triggered this job
以及如何获取 EAR 文件的引用?
I want to deploy an EAR file from an upstream project in a Jenkins build pipeline, where the filename is dynamically generated using jenkins environment variables eg
myEar_2011-11-08_14-21-06_521.ear
The file is then archived. How can I reference this file in the downstream project that does the actual deploy? I see the option for
This build is parameterized :
Build selector for Copy Artifact
Name - ???
Default Selector - Upstream build that triggered this job
What do I put in 'Name' and how do i get a reference the EAR file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在命名中使用通配符。我认为使用这样的名称值可能会起作用:
如果存档文件不在顶层,您可能需要添加额外的路径。
我们在几个工作中使用类似的方法,其中文件名取决于日期和版本。
You'll have to use wildcards in the nameing. I think that using a Name value like this might work:
You might need to add extra path if the archived file isn't at the top level.
We use a similar approach in several of our jobs where the name of the file is date-and-build dependent.