What is Jenkins pipeline? Types of Pipeline, Creating the pipeline using Classic UI method in Jenkins.

  In the Jenkins pipeline there were two types one was declarative, another one was scripted pipeline. Both the pipeline are DSL(Domain Spec...


 
In the Jenkins pipeline there were two types one was declarative, another one was scripted pipeline.
Both the pipeline are DSL(Domain Specific Language).

What is Domain-specific Language:
         DSLs are small languages, focused on a particular aspect of a software system. You can't build a whole program with a DSL, but you often use multiple DSLs in a system mainly written in a general-purpose language.

In Jenkins, we can able to create a pipeline using the following three methods.
1. Using Blue Ocean UI
2. Using Classic UI
3. Using SCM

Blue Ocean: 
                  After setting the pipeline using Blue Ocean UI, we can create the Jenkins file and commit to the source code.

Classic UI: 
                We can create the basic pipeline using classic UI.

Using SCM:
                 We can create the Jenkins file manually and commit to the source code.
The syntax of each pipeline is the same for all.

Now we are going to define the Jenkins declarative pipeline using classic UI

Step 1: log in to the Jenkins server using the username password which was previously created.

Step 2: In the latest version of Jenkins pipeline plugins were installed automatically when we have installed the required plugins at that time. Older versions of Jenkins need to install the pipeline manually.

Step3: Creating the Jenkins job, click a new item in Jenkins Dashboard



Step4: Now create the pipeline job, so we need to add the name of the project and need to select the pipeline option

once the pipeline was created, it was listed on the Dashboard page
 
Step5: Now click the pipeline job listed in the dashboard and configure, build a pipeline.
Step6: Inside the configure, we have some options, now directly to go to the advanced project options.
Step7. In the advance project options, we have pipeline, In the pipeline as two options 
 1. pipeline script
 2. pipeline script from SCM
 
Pipeline script from SCM, we can use our script file (Jenkinsfile) from git.
Now we are going to use a pipeline script.

Now we are going to write our First pipeline script.

pipeline {                  -----------------------> 1
    agent any             -----------------------> 2
 stages {                   -----------------------> 3
    stage ("test project"){
steps {                      ------------------------>4
    echo "techie first project"
}        
    }
}    
    
}


1’ st step need to declare the pipeline

2. Agent -- agent is instructed Jenkins to allocate the executor, whether agent/node.
      
   Here we are using agent any, which means it can use any agent to execute the pipeline

3. Stage: it contains the steps to build, test, deploy the process, 
                It is used to visualize the Jenkins pipeline process.

4. Step: It is a single task, it executes the specific process in a defined time.

Once created the pipeline, apply and save the option.

Step 8: Now, check the pipeline, click the build now option to build our first pipeline project.
Now the build was successful, Now we can able to check console output and logs as well.

The log output shows Techie first project, which we gave in the pipeline.

so finally, we have successfully created and executed the job using the Jenkins pipeline.
In the next blog, we will see to create the pipeline using the SCM method.














































COMMENTS

Name

AWS,2,Devops,15,linux,9,
ltr
item
Techie View: What is Jenkins pipeline? Types of Pipeline, Creating the pipeline using Classic UI method in Jenkins.
What is Jenkins pipeline? Types of Pipeline, Creating the pipeline using Classic UI method in Jenkins.
https://1.bp.blogspot.com/-bnyxIb6OjOQ/YMJmXdcv8FI/AAAAAAAAATM/oylK1NX_zOgF4RIqwWhCCee4MK6A5dZTQCLcBGAsYHQ/w400-h276/ej-strat-VjWi56AWQ9k-unsplash.jpg
https://1.bp.blogspot.com/-bnyxIb6OjOQ/YMJmXdcv8FI/AAAAAAAAATM/oylK1NX_zOgF4RIqwWhCCee4MK6A5dZTQCLcBGAsYHQ/s72-w400-c-h276/ej-strat-VjWi56AWQ9k-unsplash.jpg
Techie View
https://www.techiev.com/2021/06/what-is-jenkins-pipeline-types-of.html
https://www.techiev.com/
https://www.techiev.com/
https://www.techiev.com/2021/06/what-is-jenkins-pipeline-types-of.html
true
7013663511659419322
UTF-8
Loaded All Posts Not found any posts VIEW ALL View Full Article Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy