Versions Compared

Key

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

...

For Automatics Framework and Utils to work after migrating to JDK 11 there are 2 different ways.

  1. Only Migrating the JDK Migrating both JDK and Jenkins server (Recommended)
  2. Only Migrating

...

The below steps can be used to upgrade Automatics Tools to JDK 11 without upgrading Jenkins server.

  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.

    Image Removed
  3. Now Click the button Add JDK and Untick Install automatically option 
    Image Removed
  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.Image Removed
  5. Now Click Save at the bottom.
  1. the JDK 

Migrating both JDK and Jenkins server

...

  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 updateyumupdate
      yum 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)

Only Migrating JDK

The below steps can be used to upgrade Automatics Tools to JDK 11 without upgrading Jenkins server.

  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 update
    yum 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.

    Image Added
  3. Now Click the button Add JDK and Untick Install automatically option 
    Image Added
  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.Image Added
  5. Now Click Save at the bottom.

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

...