Commit ee00f8ee authored by 智勇's avatar 智勇
parents b7744267 a59ee914
......@@ -64,7 +64,7 @@ elif [[ $database_name = 'dujiangyan' ]]; then
port='3310'
elif [[ $database_name = 'mall' ]]; then
# 白条商城
sys_table_list='mall_config activity_3c_product ad_detail new_3c_product supplier 3c_product 3c_product_spec apix_phone_recharge_detail apix_recharge_project apix_recharge_project_bak category configuration course_detail_info course_info merchant pay19_recharge_project mall_category product product_sku product_sku_image product_spu product_nature nature_value product_category spu_image product_nature_value'
sys_table_list='mall_config activity_3c_product ad_detail new_3c_product supplier 3c_product 3c_product_spec apix_phone_recharge_detail apix_recharge_project apix_recharge_project_bak category configuration course_detail_info course_info merchant pay19_recharge_project mall_category product product_sku product_sku_image product_spu product_nature nature_value product_category spu_image product_nature_value goods_after_sale_step goods_after_sale_config'
port='3310'
elif [[ $database_name = 'qinqiong' ]]; then
# qinqiong
......
......@@ -70,16 +70,16 @@ function buildUiProject()
cp -r $config_path/ui/$project.* $project_path/$project/$config_file
fi
imagemin_dist=`grep -n -A3 "imagemin" *.js|awk '{print $1}'`
#imagemin_dist=`grep -n -A3 "imagemin" *.js|awk '{print $1}'`
if [ -n "$imagemin_dist" ];then
echo "npm install gruntjs/grunt-contrib-imagemin"
#if [ -n "$imagemin_dist" ];then
# echo "npm install gruntjs/grunt-contrib-imagemin"
#${node4_path}/
npm install gruntjs/grunt-contrib-imagemin
# npm install gruntjs/grunt-contrib-imagemin
#${node4_path}/npm --registry http://192.168.3.7:4873 install async
else
echo "dont install imagemin"
fi
#else
# echo "dont install imagemin"
#fi
# --registry http://192.168.3.7:4873
if [ "$node_version" = "node4" ] ;then
echo "----node-V4---${node4_path}/npm install"
......
......@@ -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"`"
#apkfile=`grep "${product_flavors}" *.apk`
apkfile=`ls ${buildapk_path} | grep "${product_flavors}"`
echo ${apkfile}
echo "当前路径"
cd ${buildapk_path}
pwd
mv ${apkfile} ${project_path}/apk/${branch_name}_${product_flavors}.apk
else
echo "Fail to build android".
exit -1
fi
}
function upload_apk()
{
echo "正在将apk上传到蒲公英,请等待......"
curl -F "file=@${project_path}/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
......@@ -91,7 +91,7 @@ new pClass().init(true, "ui", "7048", "order-op-ui", "OP", null, "src/js/env.con
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", "forever start -a -s --uid activity-op src/app.js", null, 1, "优惠券中心-server","","forever stop activity-op");
new pClass().init(true, "node", "7041", "activity-op", "QG", null, "src/config.js", "sh start.sh", null, 1, "优惠券中心-server","","sh stop.sh");
new pClass().init(true, "node", "7047", "op-api", "OP", null, "src/config.js", "sh start.sh", null, 1, "系统Api Gateway-server","","sh stop.sh");
new pClass().init(true, "node", "7049", "fe-api", "QG", null, "src/config.js", "sh start.sh", null, 1, "科传项目-消息推送","","pm2 stop fe-api");
//python
......
......@@ -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
}
......@@ -69,4 +74,11 @@ tranceConfig java "hubei.api.url=http:\/\/192.168.100.185:8585" "hubei.api.url=h
#tranceConfig python "192.168.4.14" "192.168.4.20" "192.168.4.14" "qin-qiong.*"
tranceConfig java "spider-center.host=http:\/\/192.168.4.12:7021\/" "spider-center.host=http:\/\/spider-center-12.ss.xyqb.loan\/" "192.168.4.12" "spider-center.properties"
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"
#!/bin/bash
redis-cli -p 6379 FLUSHALL
redis-cli -p 6380 FLUSHALL
redis-cli -p 6381 FLUSHALL
redis-cli -p 6382 FLUSHALL
redis-cli -p 6383 FLUSHALL
......@@ -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
......@@ -45,7 +45,7 @@ elif [[ $database_name = 'dujiangyan' ]]; then
port='3310'
elif [[ $database_name = 'mall' ]]; then
# 白条商城
sys_table_list='mall_config activity_3c_product ad_detail new_3c_product supplier 3c_product 3c_product_spec apix_phone_recharge_detail apix_recharge_project apix_recharge_project_bak category configuration course_detail_info course_info merchant pay19_recharge_project product product_sku product_sku_image product_spu product_nature nature_value'
sys_table_list='mall_config activity_3c_product ad_detail new_3c_product supplier 3c_product 3c_product_spec apix_phone_recharge_detail apix_recharge_project apix_recharge_project_bak category configuration course_detail_info course_info merchant pay19_recharge_project product product_sku product_sku_image product_spu product_nature nature_value goods_after_sale_step goods_after_sale_config'
port='3310'
elif [[ $database_name = 'qinqiong' ]]; then
# qinqiong
......
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