Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Upgrade the JDK on your Jenkins master node. You can use a package manager(yum , apt etc.) to install the new JVM. The last command will give the list of JDKs available in the VM along with its directory path

    Code Block
    languagepowershell
    titleInstall JDK11
    linenumberstrue
    yum updateyum install java-11-openjdkupdate-java-alternatives --list
  2. Configuring multiple JDK in Jenkins server. After installing JDK 11, check whether JDK Tool plugin is available in the jenkins server. A typical Jenkins installation already includes the JDK Tool Plugin (now called Oracle Java SE Development Kit Installer). If not, go ahead and install it from the Jenkins plugin manager.

    A good indication that the plugin is installed can be found by going to Manage Jenkins > Global Tool Configuration and locating the JDK section.

  3. Now Click the button Add JDK and Untick Install automatically option 
  4. Enter the name of the JDK and path of the corresponding JDK in the respective fields. You need to configure both JDK 8 and JDK 11 here.
  5. Now Click Save at the bottom.

...

If you need to upgrade Jenkins as well as the JVM, we recommend that you:

  1. Back up JENKINS_HOME

  2. Stop the Jenkins instance

  3. Upgrade the JVM on which Jenkins is running

    • Use a package manager to install the new JVM.

      Code Block
      languagepowershell
      titleInstall JDK11
      linenumberstrue
      yum updateyum install java-11-openjdk



    • Make sure the default JVM is the newly installed version. If it is not, run systemctl edit jenkins and set either the JAVA_HOME environment variable or the JENKINS_JAVA_CMD environment variable.

  4. Upgrade Jenkins to the most recent version

    • How you upgrade Jenkins is dependent upon your original Jenkins installation method.

    • We recommend that you use the package manager of your system (such as apt or yum).

    • If you have used a .war file for jenkins server, the download the latest .war file from Jenkins official website and replace that .war file with the existing one(Don't forget to keep a Backup of existing jenkins .war file.) (see .war file upgrade)
      • Download the latest Jenkins WAR file to an appropriate directory on your machine

      • Open up a terminal/command prompt window to the download directory

      • Replace that .war file with the existing one(Don't forget to keep a Backup of existing jenkins .war file.)
      • Run the command java -jar jenkins.war

  5. Validate the upgrade to confirm that all plugins and jobs are loaded

  6. Upgrade the required plugins (see Upgrading Plugins)

Upgrading Automatics Framework and Jenkins setup created using Automated deployment to JDK 11

...