difference between freestyle project and pipeline in jenkins

时间:2017-04-10 02:27:15

标签: jenkins jenkins-plugins jenkins-pipeline

I'm a little confused about Freestyle project and pipeline in jenkins when trying to create new items.

When should I create item with Freestyle project? And in which case should I use pipeline?

Do I need to store config.xml into code repository for future import? Or any other usage?

Thanks for your help.

5 个答案:

答案 0 :(得分:22)

if you've used jenkins in the past without using a Jenkinsfile, you've used something more similar to a freestyle project.

if you hate typing things into CI systems and therefore want to use pipelines as code--where you put all of your CI configuration into a file in source control (Jenkinsfile) and let Jenkins read that file to figure out what to do--use pipelines. once you know pipelines, there won't be many cases where you'll prefer freestyle projects.

答案 1 :(得分:4)

不同之处在于,在Pipeline中,我们有能力将我们的工作分成不同的阶段,我们可以拥有我们想要代表我们用于部署软件的流程的任何阶段,当然,如果出现任何问题,我们可以看出哪个阶段有问题;例如。我们甚至可以在继续之前添加验证。我们能够并行运行各个阶段,因此我们可以非常轻松地在不同的分支中执行多个测试。

答案 2 :(得分:1)

如果您是开发人员,则将代码编写为流水线会更轻松,更轻松。 自然。如果您是DevOps专业人员,则维护管道会更加容易 因为您可以将其视为驱动关键流程的任何其他代码集。

答案 3 :(得分:0)

如果要为CI CD管道实施UCD工具,请尝试添加改造插件

答案 4 :(得分:0)

我们可以说自由式项目和Pipeline之间的主要区别。使用Pipeline,您可以使用ruby程序编写jenkins文件,并可以配置CI / CD。