詹金斯 - 使用一个作业的结果,在另一份工作 [英] Jenkins - Using the results of one job, in another job

查看:149
本文介绍了詹金斯 - 使用一个作业的结果,在另一份工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行生成文件并生成一些文件的工作。那么我想一个发布这些文件,以常春藤另一份工作。

I have a job that runs a makefile and generates some files. I then want another job that publishes these files to ivy.

我知道克隆工作区插件,但没有任何其他的选择吗?

I am aware of the clone workspace plugin, but is there any other options?

推荐答案

您运行的的Makefile 的,而你要发布的常春藤的?

You run a Makefile, and you're publishing to Ivy?

常春藤是蚂蚁的一部分,是一个模块,采用全球Maven仓库结构的优势,抢要求jarfiles中和其他依赖。

Ivy is part of Ant, and is a module that takes advantage of the worldwide Maven repository structure to grab required jarfiles and other dependencies.

不要误会我的意思,我用了一个本地远程Maven仓库发布的C / C ++库(你可以使用的wget 来获取项目),其他项目将依靠。但是,我没有这样做,使用常春藤。

Don't get me wrong, I've used a local remote Maven repository to publish C/C++ libraries (you can use wget to fetch the items) that other projects will depend upon. But, I didn't do that using Ivy.

如果你想的Apache常春藤的,那么你可以使用发布的的Maven 的。有一个Maven插件版,将你的神器复制到您的Maven仓库,但你可能想要做的就是进行部署。

If you're thinking of Apache Ivy, then you can publish using Maven. There's a Maven Release plugin that will copy your artifact to your Maven repository, but what you probably want to do is deploy.

在我的詹金斯版本,我根本就詹金斯执行Maven的部署文件的命令行一步。这让我的文件部署到我的<击>的Maven 常春藤库,而无需首先创建一个pom.xml文件。 (当然,您无论如何要创建一个pom.xml因为要包括依赖性层次结构。)

In my Jenkins builds, I simply had Jenkins execute maven's deploy-file step from the command line. This allowed me to deploy files into my Maven Ivy repository without having to first create a pom.xml file. (Well, you want to create a pom.xml anyway because you want to include a dependency hierarchy.)

我通常在同一个作业,以创建我的JAR /战争/耳朵文件的作业这样做。但是,如果你想有一个单独的作业要做到这一点,您可以使用复制神器插件。这个插件允许作业B复制任何或所有工作A.公布的文物这是一个很多比克隆整个工作区更快,更简单,如果你只是想内置<击> JAR 文件。

I usually did this in the same job as the job that created my jar/war/ear file. However, if you want a separate job to do this, you can use the Copy Artifact Plugin. This plugin allows Job B to copy any or all of the published artifacts from Job A. That's a lot faster and simpler than cloning a whole workspace if you just want the built jar files.

这篇关于詹金斯 - 使用一个作业的结果,在另一份工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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