Reputation: 880
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?
Upvotes: 58
Views: 49306
Reputation: 423
The main difference I see between Jenkins Freestyle projects and Pipeline is the usage of GUI vs scripting.
Below are some differences in more detail
Jenkinsfile can be one of two of below types
You can append config.xml to the end of the jenkins url(in browser) and view all information related to that job as a xml file. This is also possible for user who do not have write access to that job. Not sure why do you need to store it in the source code.
In my opinion, go for the pipeline if you have some experience with Jenkins. But if you're using it for the first time or do not have much experience, starting from Freestyle projects is a good idea and eventually you can convert it into a pipeline and achieve much more complex stuff.
Upvotes: 6
Reputation: 1
In pipeline we write a Jenkins file ,it is written in the language of groovy based.in this file we write all stages in single file it is automate the cl/cd . In free style job,it is use full in the learning process of ci/cd.in this we write the stages separately Group of stages are linked to called as pipeline.
Upvotes: 0
Reputation: 387
Another aspect you can take into consideration is the fact that you write code in a file. Therefore you can store it in a git server to keep your old jobs accessible
Upvotes: 1
Reputation: 61
If you’re a developer, writing your pipeline-as-code will feel more comfortable and natural. If you’re a DevOps professional, maintaining your pipeline will be easier because you can treat it like any other set of code that drives key processes.
Upvotes: 3
Reputation: 197
We can say the main difference between freestyle project and Pipeline. with Pipeline, you can write jenkins file using ruby program with this you can configure CI/CD.
Upvotes: -1
Reputation: 14047
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.
Upvotes: 46
Reputation: 21
Try to add retrofit plugin if you want to implement UCD tool for CI CD pipeline
Upvotes: 1
Reputation: 179
The difference is that in Pipeline we have the ability to break our jobs out into different stages and we can have whatever stages we'd like to represent the process we use to deploy software and of course, if anything goes wrong, we can see which stage had the problem; for example. We even have the ability to add in verification before we proceed. We have the ability to run stages in parallel so we could have multiple tests executing in separate branches very easily.
Upvotes: 14