...
- Take a backup of the Jenkins directory - /var/lib/jenkins or take a snaphost of the whole volume (named Jenkins-snapshot) via the AWS console (Elastic Block Store → Snapshots→ Create snapshot)
- Stop Jenkins (via web console or via terminal - service jenkins stop) - make sure no bulds are running first!
- Get the latest Jenkins war (https://jenkins.io/download/) (LTS recommended) and replace it in /usr/lib/jenkins/jenkins.war
- Sometimes some additional steps may be required - the upgrade guide will list them: https://jenkins.io/doc/upgrade-guide/
- Start jenkins again - service jenkins start
- Make sure that after a few minutes Jenkins is running at http://build.openlmis.org/ and that everything looks stable
- In case of any problems you can consult the logs (Scalyr or /var/log/jenkins/jenkins.log - as superuser)