Steps:
- Backup volumes before upgrade:
Before upgrading, we recommend you take a backup of the volumes mounted. This ensures no data is lost during the docker container upgrade process. For example:/home/${USER}/BrowserStackCodeQuality/gamma_data
/home/${USER}/BrowserStackCodeQuality/gamma_psql_data
- Stop and remove existing running Docker container:
Use thedocker stop
anddocker rm
commands to safely remove the existing container as part of the upgrade BrowserStack Code Quality procedure. - Download the latest release:
Log in to the Customer Portal releases section and download the latest BrowserStack Code Quality version as<BROWSERSTACK_CQ_VERSION>.tar.gz
. - Load the Docker container:
Use thedocker load
command to import the new version of BrowserStack Code Quality:docker load -i BrowserStackCodeQuality_<BROWSERSTACK_CQ_VERSION>.tar.gz
- Re-run the Docker container:
Use the following command to re-run the updated container, ensuring all environment variables such as ACCEPT_EULA, RISK_XMX, and ANALYSER_XMX are properly set:docker run -m 12GB -d -p 3000:3000 --name BrowserStackCodeQuality -e ACCEPT_EULA=Y -e gamma_ui_public_host=http://:3000 -e EMB_USE_NATIVE_PYPARSER=TRUE -e RISK_XMX=-Xmx2024m -e ANALYSER_XMX=-Xmx8072m -v /home/${USER}/BrowserStackCodeQuality/gamma_data:/opt/gamma_data -v /home/${USER}/BrowserStackCodeQuality/gamma_psql_data:/var/lib/postgresql -v /home/${USER}/BrowserStackCodeQuality/logs:/opt/gamma/logs browserstack/code-quality:<BROWSERSTACK_CQ_NEW_VERSION>
Important Notes:
- Backups of
gamma_data
andgamma_psql_data
are critical for preventing data loss during the docker upgrade process. - Ensure
docker run
uses the updated version<BROWSERSTACK_CQ_NEW_VERSION>
. - All environment variables setup should match your previous configuration.