Skip to main content

Upgrade Java for Jenkins

It is always a good idea to test things in PTLSBOX(Sandbox) before doing them in PROD(PTL), upgrading Java for Jenkins is no exception. Upgrade the agents first and then the built-in controller node.

Upgrade SBOX Jenkins agents

Upgrade the SDS agents first and then CFT.

  1. Create a PR in the CNP Jenkins Docker with the Java version incremented. You can find the updated Jenkins base image tag from the Jenkins dockerhub repo.
  2. Creating the PR should have automatically created a docker image with a pr- in its name.
  3. Check jenkins/jenkins repository for the updated tag.
  4. To test the agents with the new Java version alter the path to the Java runtime to point to the upgraded Java version for CFT or SDS depending on what you are upgrading.
  5. Keep checking for new agents(this may take 15 minutes) and then look under system information to find out what runtime is being used. Verify the log of the new agents to see if they started correctly.
  6. After you can see new agents are running verify that the upgrade was successful by running the Plum tests or the Toffee tests if you are upgrading SDS.

Notes

Unless you are also changing the default Java version running java -version on the nodes will not tell you accurate info. To confirm the upgrade has occurred go under system information on Jenkins for one of the nodes.

Upgrade Jenkins sandbox built-in controller

Once the Jenkins agents are working in PTLSBOX you can then upgrade the PTLSBOX built-in controller. Upgrade the SDS built-in controller first and then the CFT built-in controller. To upgrade SDS PTLSBOX do the following:

  1. If you have not already done so create a PR in the CNP Jenkins Docker with the Java version incremented. You can find updated Jenkins base image tag from the Jenkins dockerhub repo.
  2. Creating the PR should have automatically created a Docker image with a pr- in its name.
  3. Check the jenkins/jenkins repository for the updated tag.
  4. Point the SDS flux config to use that new tag by updating PTLSBOX.
  5. After 10 - 15 minutes check the runtime version on Jenkins and verify that the SDS Jenkins agents are working as expected by running the Toffee tests.

Do the same for CFT by updating CFT SBOX-INTSVC and by running the Plum tests. If everything is working as expected, you can move on to upgrade the production Jenkins agents.

Upgrade production Jenkins agents

Same steps as upgrading PTLSBOX but instead use this for SDS and this for CFT.

Upgrade production Jenkins built-in controller

After the Jenkins agents have been upgraded you can look into upgrading the Jenkins built-in controller. A change request should not be needed for this, but be vigilant of any issues by checking Slack and monitoring the deployment. Upgrade SDS first and then CFT.

  1. Firstly merge in the changes to the Docker image that you made earlier. Make note of the tag that is created when you merge it in by checking the build log. This alone won’t upgrade the Java version as you will need to update the tag that is used. Upon merge, check the jenkins/jenkins repository for the updated tag. You should also be able to see it in the build log when you merge your changes.
  2. Bump the Docker image tag for SDS PTLSBOX or CFT SBOX-INTSVC.
  3. Bump the Docker image tag for SDS PROD or CFT PROD.
  4. Point the flux config to use that new tag by updating the SDS PROD flux config or the CFT PROD flux config
  5. After 10 - 15 minutes check the runtime version on Jenkins and verify that the upgrade was successful for SDS by running Toffee tests or for CFT run the Plum tests.

Rollback Agents

Revert changes to SDS and CFT. Decrement the Docker image version CNP Jenkins Docker.

Rollback Controller

Revert changes to SDS and CFT. Decrement the Docker image version CNP Jenkins Docker.

Examples

SDS agent node SDS built-in controller

CFT agent CFT built-in controller

This page was last reviewed on 15 July 2024. It needs to be reviewed again on 15 July 2025 by the page owner platops-build-notices .
This page was set to be reviewed before 15 July 2025 by the page owner platops-build-notices. This might mean the content is out of date.