enthuguy
enthuguy

Reputation: 415

How to create build pipeline in Jenkins?

How to create build pipeline view in Jenkins using Jenkins CLI or through scripting? I would prefer CLI if possible.

Right now I create a Bunch of jobs including downstream. So would prefer a way to automate pipeline view.

Upvotes: 0

Views: 14771

Answers (3)

chanukhya bachina
chanukhya bachina

Reputation: 181

Step 1: For creating a build pipeline, First create a set of jobs. Pipeline jobs

Step 2: Now create a build pipeline view and in the configure section add the first job that you want to run in the pipeline

New pipe line view

Step 3:Now for every job, add a post build action, which can be modified many ways, for example manual trigger or automatic trigger on successful of the build.

downstream projects

step 4: Once all the downstream jobs are configured, just build the p1 job. and go to the new pipeline view that you have created.

enter image description here

Note: You won't see a pipeline untill first job is started. In this example, after p1 job is started you will start seeing a pipeline

Upvotes: 3

daspilker
daspilker

Reputation: 8194

You can use the Job DSL Plugin to define a Build Pipeline View and any jobs for the pipeline.

If you want to run the DSL from CLI, you can checkout the REST API Runner.

Upvotes: 0

mahinlma
mahinlma

Reputation: 1258

Use BUILD FLOW plugin, in which you can use simple DSL scripts.

By using this plugin you can build both pipeline & parallel jobs

Upvotes: 0

Related Questions