Is it possible to create a jenkins pipeline without using a jenkinsfile

+1 vote
How can I create a simple jenkins pipeline without having to write the jenkinsfile or use the concept of pipeline as code?
May 31, 2019 in Jenkins by Sam
• 6,260 points

1 answer to this question.

+1 vote
Best answer

Yes, you can create a Jenkins pipeline manually without having to write the script/code in the Jenkinsfile.

Suppose I have to create a pipeline comprising of  3  jobs namely:

Job 1 : Compile  

Job 2 : Test  

Job 3 : Package

Create the jobs. 

Here I have created 3 jobs as specified above which use Git repository for the source code and maven (invoking top level maven targets and specifying the goal as compile)

After Creating all the 3 jobs the next step we have to do is to connect them in the form of a pipeline. In order to do this we need to configure two things: Build Triggers and Post Build Actions

Go to Configure tab of the compile job -> Build Trigger ->Select "Build after other projects are built"->Specify the job that should trigger it.

Since I want to manually build the compile job, I am not specifying a build trigger for the compile job.

Next Go to "Post build Actions" ->Select "Build other projects" -> Specify the job that you want to trigger next. In this case,I want Test to run after compile. Hence I specify Test job as shown below :

Similarly I configure Test job : Build Trigger in this case would be compile and Post build action would be to build Package job as shown below

Same for Package job: Build Trigger would be Test and since this is the last job in the pipeline there is no Post build action for this job.

Now for the pipeline view you will need to install "Build Pipeline plugin". 

Go to Manage Jenkins -> Manage Plugins -> Available tab -> search for Build Pipeline plugin->Install it.

Once the plugin is installed Go to Jenkins Dashboard -> click on + on top of the list of jobs -> click on build pipeline view.

Enter the view name and also the initial job and the number of builds as shown:

You will be able to see the pipeline built successfully and when you build the first job the pipeline would start as shown:

Compile job will automatically trigger Test job after its execution which on completion will trigger Package job  as shown below:

On Complete Execution the pipeline would look like:

answered May 31, 2019 by Sirajul
• 59,230 points

selected May 31, 2019 by Kalgi

Related Questions In Jenkins

+1 vote
3 answers
+3 votes
7 answers

Is it possible to shift or move jobs between two jenkins servers?

Hi, You can copy Jobs in between your ...READ MORE

answered Dec 16, 2020 in Jenkins by MD
• 95,440 points
0 votes
1 answer
0 votes
1 answer

how to create a job using jenkins for Sign the puppet certificate on master ?

Take a look at this  https://fullstack-puppet-docs.readthedoc ...READ MORE

answered May 29, 2020 in Jenkins by Sirajul
• 59,230 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
2 answers
0 votes
1 answer
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP