Jenkins Continuous Deployment

Source – wisdomjobs.com

How Jenkins supports continuous deployment?

Jenkins offers good support for continuous deployment and delivery. Flow of any software development through deployment is shown below.

jenkins continuous deployment

Main part of Continuous deployment is to make sure that the entire above shown process is automated. Jenkins accomplishes all of this using various plugins, one of them being “Deploy to container Plugin” which was seen in the earlier lessons.

continuous_deployment_container_plugin

Many plugins are available which can actually give a graphical representation of the Continuous deployment process. But first let’s create another project in Jenkins to see how this works.

Create a simple project which emulates the QA stage and performs a test of the Helloworld application.

Step 1 − Go to the Jenkins dashboard and click on New Item. Choose a ‘Freestyle project’ and enter the project name as ‘QA’. Click on the Ok button to create the project.

freestyle_project

Step 2 − in this example, we are keeping it simple and just using this project to execute a test program for the Helloworld application.

helloworld_application

Now as your project QA is now setup, you can do a build to see if it builds properly.

qa_project_build

Step 3 − Now click on Helloworld project and click on the Configure option

project_configure_option

Step 4 − in the project configuration, choose the ‘Add post-build action’ and choose ‘Build other projects’

add_post_build_action

Step 5 − in the ‘Project to build’ section, enter QA as the project name to build. You can leave the option as default of ‘Trigger only if build is stable’. Click on the Save button.

trigger_stable_build

Step 6 − Build the Helloworld project, then in the Console output, you will also see that after the Helloworld project is successfully built, the build of the QA project will also happen.

qa_project_console_project

Step 7 − Now install the Delivery pipeline plugin. Go to Manage Jenkins → Manage Plugin’s. In the available tab, search for ‘Delivery Pipeline Plugin’. Click On Install without Restart. Once done, restart the Jenkins instance.

restart jenkins

Step 8 − to view the Delivery pipeline in action, in the Jenkins Dashboard, click on the + symbol in the Tab next to the ‘All’ Tab.

delivery_pipeline

Step 9 − Enter any name for the View name and choose the option ‘Delivery Pipeline View’.

delivery_pipeline_view

Step 10 − in the next screen, leave the default options. User can change below settings

  • Ensure the option ‘Show static analysis results’ is checked.
  • Ensure the option ‘Show total build time’ is checked.
  • For the Initial job – Enter the Helloworld project as the first job which should build.
  • Enter any name for the Pipeline
  • Click the OK button.

change_settings

Now you will get to see a great view of the entire delivery pipeline and you will be able to see the status of each project in the entire pipeline.

each_project_status

Another popular plugin is the build pipeline plugin.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x