shashank srivastava
shashank srivastava

Reputation: 187

What is the difference between Pipeline and Project in Jenkins?

What is the difference between Pipeline and Project in Jenkins? Can I call a project from Pipeline. If Yes how using linux node?

Upvotes: 15

Views: 10743

Answers (2)

Stefan Crain
Stefan Crain

Reputation: 2060

In Jenkins Projects are Jobs. Jobs can contain pipelines but they can also contain other workflows.

Jenkins docs intro to pipeline

Jenkins Pipeline is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. Pipeline provides an extensible set of tools for modeling simple-to-complex delivery pipelines "as code" via the Pipeline DSL. 1

Jenkins Terminology

Job/Project: Jenkins seems to use these terms interchangeably. They all refer to runnable tasks that are controlled / monitored by Jenkins.

Pipelines have a DSL (domain specific language) that only works within a Jenkins pipeline job. Here is an example of how to run an existing Job / Project on a Linux node within a pipeline project.

// specify your linux node by name
node('linux') {

    // run the project job named your-other-job
    stage('run project') {
        build 'your-other-job'
    }    

}

To dig deeper make sure to check out the helpful syntax generator built into Jenkins. enter image description here

And these pipeline examples

Upvotes: 9

Emna Ayadi
Emna Ayadi

Reputation: 2460

I suggest this helpfull link :

from-freestyle-to-pipeline

Upvotes: 2

Related Questions