将代码添加到jenkins构建中 [英] Adding code to jenkins build

查看:227
本文介绍了将代码添加到jenkins构建中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个c#代码从sharepoint获取文件(例如excel)。这是一个独立的代码。我必须将这个独立代码添加到现有项目的Jenkins构建中,以便代码在编译时执行。我怎样才能实现这一点?詹金斯对我来说很新鲜。



我尝试过:


$ b $我是詹金斯的新手。实际上我把它当作一种方法并在运行时执行它。但我需要它作为编译时执行。所以唯一的办法是尝试使用Jenkins构建文件。

I have a c# code which gets a file (say excel)from sharepoint. This is a stand alone code. I have to add this stand alone code to Jenkins build of an existing project, so that the code gets executed in compile time.. How can I achieve this? Jenkins is very new to me.

What I have tried:

I'm new to Jenkins. Actually I did it as a method and executed it in run time. But I need it as a compile time execution. So only way is to try in Jenkins build file.

推荐答案

在Jenkins中有作业,你可以将该代码添加为在MSBuild之前运行的作业 - 或者您正在使用的构建系统 - 您的Jenkins CI管道的一步。这样,代码将在作业之前或之后运行。添加作业的过程很简单,您只需使用Jenkins的GUI并添加新作业,传递可执行文件的路径,或使用Bash / Batch命令行界面手动执行代码。



在Jenkins中同时运行代码是一个高级主题,需要概念性地理解Jenkins和节点。



分布式构建 - Jenkins - Jenkins Wiki [ ^ ]

管道:节点和进程 [ ^ ]



查看以下链接,

Jenkins安装程序构建作业 [ ^ ]

构建软件项目 - Jenkins - Jenkins Wiki [ ^ ]
In Jenkins there are jobs, you can add that code as a job, that runs before the MSBuild—or whatever build system you are using—step of your Jenkins CI pipeline. This way, the code will run before the job, or after it. The process of adding a job is easy, you just use the GUI of the Jenkins and add a new job, pass the path for the executable, or use the Bash/Batch command-line interface to execute the code manually.

Running the code concurrently in Jenkins is an advanced topic and requires the conceptual understanding of Jenkins and nodes.

Distributed builds - Jenkins - Jenkins Wiki[^]
Pipeline: Nodes and Processes[^]

Check the following links,
Jenkins Setup Build Jobs[^]
Building a software project - Jenkins - Jenkins Wiki[^]


这篇关于将代码添加到jenkins构建中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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