test: add deploy in CI

This commit is contained in:
chenhaoran 2024-07-23 17:19:42 +08:00
parent 158466a525
commit fbd17ca914
2 changed files with 5 additions and 5 deletions

View File

@ -30,19 +30,19 @@ sudo systemctl start docker
mkdir -p /var/lib/jenkins/workspace/log
# Assuming you have a file called 'file_list.txt' with one filename per line
file_list="ci_deploy_dependcy_file_list.txt"
moniterip="192.168.1.59"
file_list="ci_deploy_dependency_file_list.txt"
monitorip="192.168.1.59"
passwd_all="abcdefg"
# Read the file list and call scp_file_from_host for each file
while IFS= read -r source_filename; do
scp_file_from_host "$moniterip" "$passwd_all" "$source_filename"
scp_file_from_host "$monitorip" "$passwd_all" "$source_filename"
done < "$file_list"
# modify the configuration file
ip=$(ifconfig |grep inet|grep 192 |awk '{print $2}')
sed -i "s/${moniterip}/$ip/" /home/log_server.json
sed -i "s/${moniterip}/$ip/" /home/m.json
sed -i "s/${monitorip}/$ip/" /home/log_server.json
sed -i "s/${monitorip}/$ip/" /home/m.json
#mkdir corefile dir and configure the system to automatically set corefile dir at startup
mkdir -p /home/coredump/ && echo "echo '/home/coredump/core_%e-%p' | sudo tee /proc/sys/kernel/core_pattern " >> /root/.bashrc