To upgrade Jenkins without losing your data, download the latest jenkins.war file, copy it to your apache-tomcat/webapps directory and restart Tomcat.
It is recommended to create a backup of the previous jenkins.war file. You may want to revert to the previous version if you find any issues after upgrading.
Upgrading only Jenkins
Execute the following steps to upgrade only Jenkins:
Stop the server:
$ sudo /opt/bitnami/ctlscript.sh stop tomcat
Copy your previous .war file in case you need to restore it:
$ cd /opt/bitnami $ cp apache-tomcat/webapps/jenkins.war apps/jenkins/jenkins.war.bak
Remove all Jenkins files to force Tomcat to deploy the new version:
$ rm -r apache-tomcat/webapps/jenkins $ rm -r apache-tomcat/webapps/jenkins.war $ rm -r apache-tomcat/work/Catalina/localhost/jenkins
Download the new version of Jenkins:
$ wget http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war $ mv jenkins.war apache-tomcat/webapps/
Start the server:
$ sudo /opt/bitnami/ctlscript.sh start tomcat
Upgrading all the components
Start a new image with the latest Jenkins version and move the content of /opt/bitnami/apps/jenkins/jenkins_home in your current installation to the new installation. Then, restart the server.