deploy libraries.
Some checks failed
Deploy Docker Images / Build dockerfile and Server deploy (push) Successful in 1m11s
Deploy / Build (push) Failing after 5m39s

This commit is contained in:
amass 2024-11-09 22:06:48 +08:00
parent 8db74364e5
commit 5695095cf4
2 changed files with 24 additions and 1 deletions

View File

@ -50,6 +50,7 @@ jobs:
script: | script: |
pkill -f HttpServer || true pkill -f HttpServer || true
cp /root/Server/HttpServer /root/Server/HttpServer.bak cp /root/Server/HttpServer /root/Server/HttpServer.bak
source /etc/profile
nohup /root/Server/HttpServer > /dev/null 2>&1 & nohup /root/Server/HttpServer > /dev/null 2>&1 &
- name: Notify-End - name: Notify-End
if: ${{ always() }} if: ${{ always() }}

View File

@ -57,7 +57,26 @@ function deploy() {
} }
function init() { 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(){ function build_docker_images(){
@ -105,6 +124,9 @@ function main() {
docker) docker)
build_docker_images $@ build_docker_images $@
;; ;;
init)
init
;;
*) *)
build build
;; ;;