How to Make a CI-CD Pipeline in Jenkins?
This article intends to provide a step-by-step approach to easily creating a CI-CD pipeline on Jenkins. Before getting straight into the process, let us understand Jenkins. Jenkins acts as a deployment platform, for the developers who continuously keep on integrating their software. In IT organizations, testing every commit individually is impossible. To overcome this pause, platforms like Jenkins came into existence.
Steps to Create a CI-CD Pipeline on Jenkins:
Step 1. Login into your Jenkins account as shown below.
Step 2. Once logged in, the user will be redirected to the Jenkins console, here’s the reference for the same.
Step 3. Right-click on Dashboard and a list of options will be shown, select “New Item”. Refer to the attached screenshot.
Step 4. Now a list of options will be visible on the screen, along with a field to name the pipeline. Add a suitable name and select the “Pipeline” option to proceed. Refer to this screenshot.
Step 5: Once redirected, the configuration page will appear. This is the most important page as here all the details will be filled in. At first, there is the General section where the user can add a description based on the project for which the pipeline has to be created. And establish the connection in order to compute from where the pipeline will access the project. Refer to the screenshot to understand better.
Step 6. Now comes the second section, i.e. “Build triggers”. Here, we need to specify the branch and repository and give the credentials too. And add additional behaviors if required so far. Refer to the screenshot to have a better understanding.
Step 7. The next section is “Advanced Project Options”, as the name suggests it is related to the special pipelines only, simpler projects do not require any specifications in this section. Please refer to the screenshot given below for the same.
Step 8. This is the last section i.e. “Pipeline”. Here the user specifies from where the scripts will be imported including the path to the file, repository, credentials, etc. Refer to the screenshot attached below for reference.
Step 9. After everything is done the user can finally choose to save and proceed ahead. Next select, “Build Now” to run the pipeline and check if it is successful or not, like the screenshot below.
If the pipeline is successful it will result in the final outcome as a success. Refer to the next screenshot to understand better.
This was a simple way to create a pipeline of the Jenkins platform.