Commit 539fc43c authored by root's avatar root

fix temp

parents ef8748c6 12539a8a
......@@ -50,7 +50,7 @@ function restartJavaProject()
echo "-----project:$project while be run command: java -Xmx256m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t > /dev/null 2>&1 &"
log_name=`node $config_server/get_project_config.js -name $project -attr log_name`
#mv $project_path/logs/$log_name $project_path/logs/logs_back/$project-$time.log
mv $project_path/logs/$log_name $project_path/logs/$project-$time.log
if [[ $project == "redpacket" ]]; then
echo `java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &`
......
......@@ -30,7 +30,7 @@ function restartJavaProject()
sleep 2s
fi
log_name=`node $config_server/get_project_config.js -name $project -attr log_name`
# mv $project_path/logs/$log_name $project_path/logs/logs_back/$project-$time.log
mv $project_path/logs/$log_name $project_path/logs/$project-$time.log
config_file=`find ./ -maxdepth 2 -name "application.properties"`
if [ -n "$config_file" ]
then
......
#!/bin/bash
project_path=/home/quant_group/jenkins/workspace/XyqbAndroidBuild
target_file=${project_path}/app/build.gradle
store_path=/home/ganshc/
source_gradlefile=${store_path}/build.gradle
source_flavors=${store_path}/markets.txt
buildapk_path=/home/quant_group/jenkins/workspace/XyqbAndroidBuild/build/archives
branch_name=$1
product_flavors=$2
cd ${project_path}
function get_code()
{
if [ -z ${branch_name} ]; then
echo "checkout default branch master"
git pull
else
echo "checkout specified branch ${branch_name}"
which git
git checkout ${branch_name}
if [ $? = 0 ]; then
echo "checkout branch $1 is ok".
git pull
else
echo "Fail to checkout branch ${branch_name}".
exit -1
fi
fi
}
function build_android()
{
echo "拷贝可使用的gradle文件"
cp -r ${source_gradlefile} ${target_file}
if [[ -z ${product_flavors} ]]; then
echo "${product_flavors}" > ${project_path}/markets.txt
fi
rm -rf ${project_path}/apk/
echo "开始使用gradle进行编译该版本的代码"
gradle clean resguard --stacktrace --debug
if [ $? = 0 ]; then
echo "gradle build is ok".
echo "开始重命名对应的渠道包"
apkfile=`find ${buildapk_path} -name "*${product_flavors}.apk"`
echo "当前路径"
pwd
cp -r ${apkfile} ${project_path}/apk/${branch_name}_${product_flavors}.apk
else
echo "Fail to checkout branch ${branch_name}".
exit -1
fi
}
function upload_apk()
{
echo "正在将apk上传到蒲公英,请等待......"
curl -F "file=@/home/quant_group/jenkins/workspace/XyqbAndroidBuild/apk/${branch_name}_${product_flavors}.apk" -F "uKey=13d17385c02ea9ea994d0c985d87ff32" -F "_api_key=5b09af98d5a8ff43f2f39935fa6bfbc1" https://static.pgyer.com/app/qrcode/lJrv
}
get_code
build_android
upload_apk
......@@ -84,11 +84,11 @@ new pClass().init(true, "ui", "7043", "xyqb-user-ui", "head_group", null, "src/a
new pClass().init(true, "ui", "7039", "merchant-op-ui", "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "商户系统-ui","");
new pClass().init(true, "ui", "7004", "di-ting-ui", "QG", null, "client/app/config.js", "grunt build", "node7", 1, "信审-ui","");
new pClass().init(true, "ui", "7020", "spider-center-ui", "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "授信中心-ui","");
new pClass().init(true, "ui", "7002", "qgbc-ui", "QG", null, "src/app/config/env.config.js", "npm run build_production", "node7", 1, "白条-ui","");
new pClass().init(true, "ui", "7050", "qgbc-ui", "QG", null, "src/app/config/env.config.js", "npm run build_production", "node7", 1, "白条-ui","");
new pClass().init(true, "ui", "7001", "xyqb-ui", "QG", null, "client/app/config.js", "grunt build", "node4", 1, "现金贷和白条-现金贷-ui","");
new pClass().init(true, "ui", "7046", "activity-op-ui", "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "优惠券管理后台-ui","");
new pClass().init(true, "ui", "7048", "order-op-ui", "OP", null, "src/js/env.config.js", "gulp build", "node7", 1, "订单系统-ui","");
new pClass().init(true, "ui", "7050", "bt-ui", "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版白条-ui","");
new pClass().init(true, "ui", "7002", "bt-ui", "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版白条-ui","");
// node
new pClass().init(true, "node", "7018", "AppBackend", "QG", null, "config/environment/test.js", "forever start -a -s --uid AppBackend bin/www", null, 1, "APP后台服务-server","","forever stop AppBackend");
new pClass().init(true, "node", "7041", "activity-op", "QG", null, "src/config.js", "sh start.sh", null, 1, "优惠券中心-server","","sh stop.sh");
......
......@@ -31,9 +31,14 @@ function tranceConfig()
then
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/node/$file_name
elif [ "$type_" = "nginx" ]
then
sed -i "s/$source_str/$target_str/g" $base_path/$ip_host/nginx_conf.d/$file_name
fi
}
......@@ -71,8 +76,9 @@ tranceConfig java "spider-center.host=http:\/\/192.168.4.12:7021\/" "spider-cent
tranceConfig java "qgbc-ui.url=http:\/\/192.168.4.152:7002" "qgbc-ui.url=http:\/\/192.168.4.152:7050" "192.168.4.152" "xyqb.properties"
tranceConfig java "7025" "7003" "192.168.4.152" "baitiao.properties"
tranceConfig node "112233445512345.ittun.com" "activity-op-22.ss.xyqb.loan" "192.168.4.22" "activity-op.js"
tranceConfig nginx "7002" "7050" "192.168.4.13" "qgbc-ui.conf"
tranceConfig nginx "7050" "7002" "192.168.4.13" "bt-ui.conf"
tranceConfig node "7002" "7050" "192.168.4.12" "AppBackend.js"
......@@ -3,5 +3,5 @@ project_path=/home/quant_group/msg-center
config_file=/home/config_files/special
cp $config_file/msg_center_white_list.py $project_path/server/white_list.py
sed -i "s/import json/import json\nfrom white_list import white_list/g" $project_path/server/mq/*.py
sed -i "s/msg = json.loads(body, \"utf8\")/msg = json.loads(body, \"utf8\")\n if msg[\"source\"] not in white_list:\n logging.info(\"IP:%s地址不再白名单之列,请联系管理员开通白名单\", msg[\"source\"])\n self.acknowledge_message(basic_deliver.delivery_tag)\n return/g" $project_path/server/mq/*.py
\ No newline at end of file
sed -i "s/import json/import json\nfrom white_list import white_list\nfrom white_list import phone_white_list/g" $project_path/server/mq/*.py
sed -i "s/msg = json.loads(body, \"utf8\")/msg = json.loads(body, \"utf8\")\n if msg[\"source\"] not in white_list:\n logging.info(\"IP:%s不再白名单之列\", msg[\"source\"])\n if msg[\"phoneNo\"] not in phone_white_list:\n logging.info(\"Phone:%s不再白名单之列,短信中心禁止发送该条短信。\", msg[\"phoneNo\"])\n self.acknowledge_message(basic_deliver.delivery_tag)\n return/g" $project_path/server/mq/*.py
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