初始化提交
This commit is contained in:
33
jenkins/云效/部署命令.conf
Normal file
33
jenkins/云效/部署命令.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
bash -c '
|
||||
set -e
|
||||
|
||||
echo "[1] 准备目录"
|
||||
mkdir -p /data/webapps/yunxiao_download
|
||||
mkdir -p /data/webapps/test_influencer_search_agent/log
|
||||
|
||||
echo "[2] 杀掉进程"
|
||||
sh /data/sh/kill_influencer_search_agent.sh
|
||||
|
||||
echo "[3] 解压"
|
||||
tar zxvf /data/webapps/yunxiao_download/influencer-search-agent.tgz -C /data/webapps/test_influencer_search_agent/
|
||||
|
||||
echo "[4] 激活 Conda 环境"
|
||||
cd /data/webapps/test_influencer_search_agent/
|
||||
source ~/.bashrc
|
||||
conda activate search
|
||||
echo "当前路径: $(pwd)"
|
||||
echo "当前Python路径: $(which python)"
|
||||
echo "当前Python版本: $(python --version)"
|
||||
|
||||
echo "[5] 安装依赖"
|
||||
pip install -r requirements.txt
|
||||
echo "依赖检查结束"
|
||||
|
||||
echo "[6] 启动进程"
|
||||
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
|
||||
nohup env PYTHONPATH=/data/webapps/test_influencer_search_agent APP_ENV=im python -m dialogue.influencer_search > /data/webapps/test_influencer_search_agent/log/influencer-search_${TIMESTAMP}.log 2>&1 &
|
||||
|
||||
echo "[7] 检查进程是否启动..."
|
||||
sleep 3
|
||||
ps aux | grep -v grep | grep "dialogue.influencer_search"
|
||||
'
|
||||
27
jenkins/云效/部署命令agent.conf
Normal file
27
jenkins/云效/部署命令agent.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
bash -c '
|
||||
set -e
|
||||
|
||||
echo "[1] 进入项目目录"
|
||||
cd /data/webapps/fly-moon-agent/
|
||||
echo "当前路径: $(pwd)"
|
||||
echo "当前路径内容: $(ls -lh)"
|
||||
|
||||
echo "[2] 杀掉进程"
|
||||
sh /data/sh/kill_fly_moon_jenniefy.sh
|
||||
|
||||
echo "[3] 解压到目标为止"
|
||||
tar zxvf ./tmp/package.tgz -C ./tmp
|
||||
cp ./tmp/flymoon-agent/target/flymoon-agent.jar ./
|
||||
cp ./tmp/flymoon-common/target/flymoon-common.jar ./
|
||||
cp ./tmp/flymoon-framework/target/flymoon-framework.jar ./
|
||||
cp ./tmp/flymoon-system/target/flymoon-system.jar ./
|
||||
echo "当前路径内容: $(ls -lh)"
|
||||
|
||||
echo "[4] 启动jar包"
|
||||
cd ~
|
||||
nohup /data/jdk1.8.0_181/bin/java -jar /data/webapps/fly-moon-agent/flymoon-agent.jar --spring.profiles.active=test > /data/webapps/fly-moon-agent/nohup.out 2>&1 &
|
||||
|
||||
echo "[5] 进程详情:"
|
||||
sleep 3
|
||||
ps aux | grep -v grep | grep "flymoon-agent.jar"
|
||||
'
|
||||
Reference in New Issue
Block a user