deploy libraries.
This commit is contained in:
parent
8db74364e5
commit
5695095cf4
@ -50,6 +50,7 @@ jobs:
|
||||
script: |
|
||||
pkill -f HttpServer || true
|
||||
cp /root/Server/HttpServer /root/Server/HttpServer.bak
|
||||
source /etc/profile
|
||||
nohup /root/Server/HttpServer > /dev/null 2>&1 &
|
||||
- name: Notify-End
|
||||
if: ${{ always() }}
|
||||
|
@ -57,7 +57,26 @@ function deploy() {
|
||||
}
|
||||
|
||||
function init() {
|
||||
scp -r /opt/Libraries/boost_1_85_0 root@amass.fun:/opt/Libraries/
|
||||
if [ ! -d ${build_path} ]; then
|
||||
mkdir ${build_path}
|
||||
fi
|
||||
if [ -f "${build_path}/Libraries.tar.gz" ]; then
|
||||
rm ${build_path}/Libraries.tar.gz
|
||||
fi
|
||||
docker run -d --rm --name http_server_deploy registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:22.04
|
||||
docker exec http_server_deploy tar -czvf /Libraries.tar.gz -C /opt Libraries
|
||||
docker cp http_server_deploy:/Libraries.tar.gz ${build_path}
|
||||
docker stop http_server_deploy
|
||||
scp ${build_path}/Libraries.tar.gz root@amass.fun:/opt/
|
||||
ssh root@amass.fun "rm -fr /opt/Libraries; tar xvf /opt/Libraries.tar.gz -C /opt; rm -fr /opt/Libraries.tar.gz"
|
||||
|
||||
paths=(
|
||||
"/opt/Libraries/wt-4.11.1/lib"
|
||||
"/opt/Libraries/boost_1_86_0/lib"
|
||||
)
|
||||
for path in "${paths[@]}"; do
|
||||
ssh root@amass.fun "grep -q '$path' /etc/profile || echo 'export LD_LIBRARY_PATH=$path:\$LD_LIBRARY_PATH' | sudo tee -a /etc/profile"
|
||||
done
|
||||
}
|
||||
|
||||
function build_docker_images(){
|
||||
@ -105,6 +124,9 @@ function main() {
|
||||
docker)
|
||||
build_docker_images $@
|
||||
;;
|
||||
init)
|
||||
init
|
||||
;;
|
||||
*)
|
||||
build
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user