{"id":2054,"date":"2022-11-19T15:42:50","date_gmt":"2022-11-19T15:42:50","guid":{"rendered":"https:\/\/technetsolutions.net\/?p=2054"},"modified":"2022-11-22T04:37:05","modified_gmt":"2022-11-22T04:37:05","slug":"how-to-upgrade-jenkins-to-new-version-and-update-plugins","status":"publish","type":"post","link":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/","title":{"rendered":"How to Upgrade Jenkins to New Version and Update Plugins"},"content":{"rendered":"\n<p>Jenkins is an open source automation server, which will help you to build, deploy and automate your enterprise application.<\/p>\n\n\n\n<p>If you are using Jenkins for production deployment, it is very critical to keep it up-to-date with the latest version.<\/p>\n\n\n\n<p>Jenkins has a very active open source community. They constantly release new versions with lot of new features and bug fixes.<\/p>\n\n\n\n<p>In this tutorial, we\u2019ll explain how to upgrade your Jenkins to a newer version, and update all the plugins accordingly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Identify Current Jenkins Version<\/h2>\n\n\n\n<p>To identify your current version of Jenkins, you can do one of two things.<\/p>\n\n\n\n<p>From the Jenkins UI, from any screen, if you look at the bottom right corner, you\u2019ll see the current version of the Jenkins that you are running.<\/p>\n\n\n\n<p>Or, login to the Jenkins server, and use the jenkins-cli.jar and execute the following to get the current version from the command line<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">java -jar jenkins-cli.jar -s http:\/\/localhost:8080\/ version\nIn my case, the current version that I\u2019m running is: Jenkins ver. 2.5\n\nWhen you login to Jenkins UI, and click on \u201cManage Jenkins\u201d menu item, if you need an upgrade, it will display the following message at the top saying that a new version of Jenkins is available for download.\nJenkins Upgrade Required\n\nIn this example, the new version that is available for download is: Jenkins ver. 2.9.\n\nSo, I\u2019ll be upgrading from version 2.5 to 2.9. Please note that the upgrade procedure is very similar for any version of Jenkins.\n\nBTW, you should use the admin account that you created during Jenkins Security Setup to login to the GUI.\nDownload New Jenkins War File\n\nWhen you click on the download link from the above message, it will not download the whole Jenkins Installer. Instead, it will download only the Jenkins.war file.\n\nYou can just copy the link to download from your Jenkins GUI, and go to command prompt, and use wget to download the war file.\n\ncd \/downloads\nwget http:\/\/updates.jenkins-ci.org\/download\/war\/2.9\/jenkins.war\n\nNote: If you\u2019ve installed Jenkins as part of yum install, then you should do \u201cyum update jenkins\u201d, which will upgrade the war file accordingly. Also, if you\u2019ve previously installed Jenkins using yum, but yum repository still doesn\u2019t have the latest version of Jenkins, you can still go-ahead and download the war file and upgrade it manually on top of the yum-jenkins-installation as explained in this article. Eventually when the repository catches up with the latest version, you can always do yum update jenkins at that time.\nInstall the New Jenkins War File\n\nOn your server, jenkins.war file is located under \/usr\/lib\/jenkins directory.\n\nBefore you copy the new version of the jenkins war file, take a backup of the existing version of jenkins war file.\n\ncp \/usr\/lib\/jenkins\/jenkins.war \/downloads\/jenkins.war.previous.version\n\nNext, copy the newly downloaded war file to the \/usr\/lib\/jenkins directory.\n\ncp \/downloads\/jenkins.war \/usr\/lib\/jenkins\/\n\nNext, restart the Jenkins service as shown below. Use either systemctl or service command.\n\nsystemctl stop jenkins\n\nsystemctl start jenkins\n\nThis shows that the Jenkins server is running with the new var file.\n\n# systemctl status jenkins\n? jenkins.service - LSB: Jenkins Continuous Integration Server\n   Loaded: loaded (\/etc\/rc.d\/init.d\/jenkins)\n   Active: active (running) since Sun 2016-06-11 20:33:16 PDT; 3s ago\n     Docs: man:systemd-sysv-generator(8)\n  Process: 32453 ExecStop=\/etc\/rc.d\/init.d\/jenkins stop (code=exited, status=0\/SUCCESS)\n  Process: 32473 ExecStart=\/etc\/rc.d\/init.d\/jenkins start (code=exited, status=0\/SUCCESS)\n   Memory: 461.2M\n   CGroup: \/system.slice\/jenkins.service\n           +-32498 \/etc\/alternatives\/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=\/var\/lib\/jenkins -jar \/usr\/lib\/jenkins\/jenkins.war --log...\n\nJun 10 20:33:15 devdb systemd[1]: Starting LSB: Jenkins Continuous Integration Server...\nJun 10 20:33:15 devdb runuser[32474]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)\nJun 10 20:33:16 devdb runuser[32474]: pam_unix(runuser:session): session closed for user jenkins\nJun 10 20:33:16 devdb jenkins[32473]: Starting Jenkins [  OK  ]\nJun 10 20:33:16 devdb systemd[1]: Started LSB: Jenkins Continuous Integration Server.\n\nPost Upgrade Tasks\n\nAfter the upgrade, login to your Jenkins UI and verify that you see the new version number at the bottom right corner.\n\nOr, execute the following command from the command line, to see the new version.\n\njava -jar jenkins-cli.jar -s http:\/\/localhost:8080\/ version\n\nAfter the upgrade, I see the new version as: Jenkins ver. 2.9\n\nAlso, now when you go to \u201cManage Jenkins\u201d page, you\u2019ll not see that upgrade available message anymore.\n\nBut here you\u2019ll see any additional tasks that you may still have to do on your Jenkins server.\n\nIn this example, I see the following that says that I should consider turning on the agent to master security subsystem.\nJenkins Admin Notification\n\nTo do this, go to Configure global security -> From this page, scroll down to the bottom section for \u201cPlugin Manager\u201d, where \u201cEnable Slave -> Master Access Control\u201d is not checked. Click on the check-box to select this option.\n\nWhen you select the \u201cEnable Slave\u201d, it will also show this right below it: \u201cRules can be tweaked here.\u201d Now, click on Save.\nJenkins Plugin Manager\n\nFrom the rules page, you can tweak the settings for this particular configuration.\nAdditional Post Upgrade Tasks\n\nWhen you go to \u201cManage Jenkins\u201d, depending on your previous Jenkins version that you were running, you might also see this message: You have data stored in an older format and\/or unreadable data.\nJenkins Old Data Notification\n\nThis happens when Jenkins decide to change how the data is stored in the backend. After the upgrade, the data is still stored in the old format on the disk, but during the load, it will convert it to the new format for usage. This is good if you decide to downgrade Jenkins to older version for some reason. But, ideally, once you upgrade and confirm that everything is working as expected, you should upgrade the the data to the new format.\n\nClick on \u201cManage\u201d next to it, which will show the following UI -> Click on \u201cupgrade\u201d\nJenkins Old Data Upgrade\n\nAfter the upgrade, this \u201cManage old data\u201d page will say \u201cNo old data was found.\u201d\n\nNow, when you go back to the manage jenkins page, you\u2019ll not see that warning message anymore.\nUpgrade Jenkins Plugins (After Jenkins Upgrade)\n\nAnytime you upgrade Jenkins to a new version, use that opportunity to upgrade all your plugins to the new version, as some plugins might not work with the new Jenkins version and might need upgrade.\n\nFrom Manage Jenkins, in the \u201cManage Plugins\u201d section, you\u2019ll see \u201c(updates available)\u201d in read which indicates that there are plugins that needs to be upgrade: Add, remove, disable or enable plugins that can extend the functionality of Jenkins. (updates available)\nList of Plugins to be Upgraded\n\nFrom Jenkins, click on \u201cManage Jenkins\u201d -> click on \u201cManage Plugins\u201d -> from this page, under the \u201cUpdates\u201d tab, this will list all the plugins that needs to be upgraded.\n\nThe list of plugins under the \u201cUpdates\u201d tab will have the following 4 columns:\n\n    Install \u2013 Checkbox to select either all the plugins or select them individually\n    Name \u2013 Plugin Name\n    Version \u2013 New version number of that particular plugin that is available for you to download and install\n    Installed \u2013 The old version number of that particular plugin that is currently installed on your system.\n\nAt the bottom, it will say \u201cUpdate information obtained: 23 hr ago \u201c. Click on \u201cCheck Now\u201d button right next to it, to check for new updates again, as we need to do this after any Jenkins Upgrade.\nJenkins Upgrade Plugin List\nUpgrade Jenkins Plugins\n\nScroll down to the bottom of the page, and click on \u201cSelect All\u201d -> Now click on \u201cDownload now and install after restart\u201d button.\n\nThis will start updating all the plugins.\n\nWhile it is upgrading the plugins, it will show the following check-box at the bottom of the page, select this check-box: Restart Jenkins when installation is complete and no jobs are running.\n\nIf the auto refresh is not enabled (it will say on the top right corner of the page), then you have to manually refresh the page to see if the upgrade is completed. You have to login again after the upgrade.\nJenkins Installing Plugins\nJenkins and Plugins Upgrade Completed\n\n\nAfter all the plugins are upgraded, you will not see \u201c(updates available)\u201d warning next to \u201cMange Plugins\u201d. Also, when you go to the plugin manager and click on \u201cUpdates\u201d tab, it will say \u201cno updates\u201d!\n\nIf you\u2019ve taken care of all post upgrade tasks, you\u2019ll not see any warning message under the \u201cManage Jenkins\u201d screen as shown below.\nJenkins Post Upgrade\n\n\n<\/pre>\n\n\n\n\n\n\n\n\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-8 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Jenkins is an open source automation server, which will help you to build, deploy and automate your enterprise application. If you are using Jenkins for production deployment, it is very critical to keep it up-to-date with the latest version. Jenkins has a very active open source community. They constantly release new versions with lot of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,1],"tags":[34],"class_list":["post-2054","post","type-post","status-publish","format-standard","hentry","category-devops","category-uncategorized","tag-jenkins"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Upgrade Jenkins to New Version and Update Plugins - technetsolutions.net<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Upgrade Jenkins to New Version and Update Plugins - technetsolutions.net\" \/>\n<meta property=\"og:description\" content=\"Jenkins is an open source automation server, which will help you to build, deploy and automate your enterprise application. If you are using Jenkins for production deployment, it is very critical to keep it up-to-date with the latest version. Jenkins has a very active open source community. They constantly release new versions with lot of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/\" \/>\n<meta property=\"og:site_name\" content=\"technetsolutions.net\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechnetSolutions.net\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-19T15:42:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-22T04:37:05+00:00\" \/>\n<meta name=\"author\" content=\"technetsolution\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"technetsolution\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/\",\"url\":\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/\",\"name\":\"How to Upgrade Jenkins to New Version and Update Plugins - technetsolutions.net\",\"isPartOf\":{\"@id\":\"https:\/\/technetsolutions.net\/#website\"},\"datePublished\":\"2022-11-19T15:42:50+00:00\",\"dateModified\":\"2022-11-22T04:37:05+00:00\",\"author\":{\"@id\":\"https:\/\/technetsolutions.net\/#\/schema\/person\/33a2eaab7eef8be9022fc9a4c37c2136\"},\"breadcrumb\":{\"@id\":\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/technetsolutions.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Upgrade Jenkins to New Version and Update Plugins\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/technetsolutions.net\/#website\",\"url\":\"https:\/\/technetsolutions.net\/\",\"name\":\"technetsolutions.net\",\"description\":\"technetsolutions.net\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/technetsolutions.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/technetsolutions.net\/#\/schema\/person\/33a2eaab7eef8be9022fc9a4c37c2136\",\"name\":\"technetsolution\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/technetsolutions.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3e06688ecbbb11dfcb794106978d4a0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3e06688ecbbb11dfcb794106978d4a0?s=96&d=mm&r=g\",\"caption\":\"technetsolution\"},\"url\":\"https:\/\/technetsolutions.net\/index.php\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Upgrade Jenkins to New Version and Update Plugins - technetsolutions.net","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/","og_locale":"en_US","og_type":"article","og_title":"How to Upgrade Jenkins to New Version and Update Plugins - technetsolutions.net","og_description":"Jenkins is an open source automation server, which will help you to build, deploy and automate your enterprise application. If you are using Jenkins for production deployment, it is very critical to keep it up-to-date with the latest version. Jenkins has a very active open source community. They constantly release new versions with lot of [&hellip;]","og_url":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/","og_site_name":"technetsolutions.net","article_publisher":"https:\/\/www.facebook.com\/TechnetSolutions.net","article_published_time":"2022-11-19T15:42:50+00:00","article_modified_time":"2022-11-22T04:37:05+00:00","author":"technetsolution","twitter_card":"summary_large_image","twitter_misc":{"Written by":"technetsolution","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/","url":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/","name":"How to Upgrade Jenkins to New Version and Update Plugins - technetsolutions.net","isPartOf":{"@id":"https:\/\/technetsolutions.net\/#website"},"datePublished":"2022-11-19T15:42:50+00:00","dateModified":"2022-11-22T04:37:05+00:00","author":{"@id":"https:\/\/technetsolutions.net\/#\/schema\/person\/33a2eaab7eef8be9022fc9a4c37c2136"},"breadcrumb":{"@id":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/technetsolutions.net\/index.php\/2022\/11\/19\/how-to-upgrade-jenkins-to-new-version-and-update-plugins\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/technetsolutions.net\/"},{"@type":"ListItem","position":2,"name":"How to Upgrade Jenkins to New Version and Update Plugins"}]},{"@type":"WebSite","@id":"https:\/\/technetsolutions.net\/#website","url":"https:\/\/technetsolutions.net\/","name":"technetsolutions.net","description":"technetsolutions.net","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/technetsolutions.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/technetsolutions.net\/#\/schema\/person\/33a2eaab7eef8be9022fc9a4c37c2136","name":"technetsolution","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/technetsolutions.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3e06688ecbbb11dfcb794106978d4a0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3e06688ecbbb11dfcb794106978d4a0?s=96&d=mm&r=g","caption":"technetsolution"},"url":"https:\/\/technetsolutions.net\/index.php\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/posts\/2054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/comments?post=2054"}],"version-history":[{"count":5,"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/posts\/2054\/revisions"}],"predecessor-version":[{"id":2061,"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/posts\/2054\/revisions\/2061"}],"wp:attachment":[{"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/media?parent=2054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/categories?post=2054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/technetsolutions.net\/index.php\/wp-json\/wp\/v2\/tags?post=2054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}