I am currently working on a task that involves creating a CI process for Liquibase snapshots, as detailed in this issue.
In the last platform call, @dkayiwa and @burke suggested trying this process locally, I wrote a script to automate the Liquibase snapshot build steps, which are normally performed manually (refer to steps to build Liquibase snapshots). I successfully automated most of the build steps, but the OpenMRS initialization step requires interaction with a browser. Do you have any suggestions on how to automate this initialise step?
Additionally, you can find the current state of my work here. I would appreciate it if you could review and provide suggestions for improvement.
Thank you for the information. I’m not quite familiar with how to set a system property or where to find the script for the OPENMRS installation. Could you please provide more guidance or specific steps on how to set the OPENMRS_INSTALLATION_SCRIPT system property and where to locate the script for automating the installation?
The value pointed to by the OPENMRS_INSTALLATION_SCRIPT system property can be an absolute file path and name, or a file in the classpath like classpath:installation.h2.properties
Thanks for your clarifications. I have successfully automated the OpenMRS installation process. Now, I am looking for a way to identify when the installation process is completed so that I can terminate the OpenMRS server afterward.
Now, I use the following command to terminate the server after installation
open_web_browser_result=$(open_web_browser)
# Check the return value and act accordingly
if [ $? -eq 0 ]; then
echo "OPENMRS Initialization success"
else
echo "OPENMRS Initialization unsuccessful"
fi
read -p "Press Enter to continue..."
kill -9 $(lsof -t -i:8080)
cd ..