Commit d2a9157d authored by 金凯强's avatar 金凯强 🎨

脚本修改

parent 329b8df5
...@@ -4,7 +4,7 @@ from upgradeImage.uploadImage import ImageClass ...@@ -4,7 +4,7 @@ from upgradeImage.uploadImage import ImageClass
from upgradeImage.util import SSHConnection, ShellManage from upgradeImage.util import SSHConnection, ShellManage
if __name__ == "__main__": if __name__ == "__main__":
log.info('*********************************升级开始*********************************') log.info('*********************************打包开始*********************************')
image_instance = ImageClass() image_instance = ImageClass()
log.info('开始复制docker-compose.yml文件') log.info('开始复制docker-compose.yml文件')
ShellManage().exec_shell('cp -f /huansi/gitlab-runner/builds/docker-compose.yml ./docker-compose.yml') ShellManage().exec_shell('cp -f /huansi/gitlab-runner/builds/docker-compose.yml ./docker-compose.yml')
...@@ -15,7 +15,11 @@ if __name__ == "__main__": ...@@ -15,7 +15,11 @@ if __name__ == "__main__":
image_instance.save_images() image_instance.save_images()
log.info('复制docker-compose.yml文件到/data/upgrade下') log.info('复制docker-compose.yml文件到/data/upgrade下')
ShellManage().exec_shell('cp -f ./docker-compose.yml /data/upgrade/docker-compose.yml') ShellManage().exec_shell('cp -f ./docker-compose.yml /data/upgrade/docker-compose.yml')
log.info('*********************************升级结束*********************************') ShellManage().exec_shell('cp -f /huansi/gitlab-runner/builds/analysis_file_to_hsright.py /data/upgrade/docker-compose.yml/analysis_file_to_hsright.py')
ShellManage().exec_shell('cp -f /huansi/gitlab-runner/builds/analysis_file_to_nginx.py /data/upgrade/docker-compose.yml/analysis_file_to_nginx.py')
ShellManage().exec_shell('cp -f /huansi/gitlab-runner/builds/base_util.py /data/upgrade/docker-compose.yml/base_util.py')
ShellManage().exec_shell('cp -f /huansi/gitlab-runner/builds/app.conf /data/upgrade/docker-compose.yml/app.conf')
log.info('*********************************打包结束*********************************')
# log.info('开始上传镜像和脚本文件') # log.info('开始上传镜像和脚本文件')
# ssh = SSHConnection(host='localhost', port=1111, username='root', pwd='huansi.net') # ssh = SSHConnection(host='localhost', port=1111, username='root', pwd='huansi.net')
# ssh.connect() # ssh.connect()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment