增加blog/gateway管理JOB
This commit is contained in:
parent
09e4c66fa2
commit
c402ddd08a
29
publish_blog.sh
Normal file
29
publish_blog.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "${PROJECT_PATH}" == "" ]; then
|
||||||
|
echo "PROJECT_PATH IS NOT FOUND"
|
||||||
|
# shellcheck disable=SC2242
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${CONFIG_PATH}" == "" ]; then
|
||||||
|
echo "CONFIG_PATH IS NOT FOUND"
|
||||||
|
# shellcheck disable=SC2242
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${APP_ID}" == "" ]; then
|
||||||
|
echo "APP_ID IS NOT FOUND"
|
||||||
|
# shellcheck disable=SC2242
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 切换到项目目录
|
||||||
|
# shellcheck disable=SC2164
|
||||||
|
# shellcheck disable=SC2009
|
||||||
|
cd "${PROJECT_PATH}" && git pull && go build mini-server.go -o "${APP_ID}" && ps aux | grep "${APP_ID}" | grep -v grep | awk '{print $2}' | xargs kill -9
|
||||||
|
|
||||||
|
# 启动服务
|
||||||
|
nohup "${PROJECT_PATH}"/"${APP_ID}" --config_path="${CONFIG_PATH}" &
|
||||||
|
|
||||||
|
echo "${APP_ID}服务启动成功"
|
29
publish_gateway.sh
Normal file
29
publish_gateway.sh
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "${PROJECT_PATH}" == "" ]; then
|
||||||
|
echo "PROJECT_PATH IS NOT FOUND"
|
||||||
|
# shellcheck disable=SC2242
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${CONFIG_PATH}" == "" ]; then
|
||||||
|
echo "CONFIG_PATH IS NOT FOUND"
|
||||||
|
# shellcheck disable=SC2242
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${APP_ID}" == "" ]; then
|
||||||
|
echo "APP_ID IS NOT FOUND"
|
||||||
|
# shellcheck disable=SC2242
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 切换到项目目录
|
||||||
|
# shellcheck disable=SC2164
|
||||||
|
# shellcheck disable=SC2009
|
||||||
|
cd "${PROJECT_PATH}" && git pull && go build mini-server.go -o "${APP_ID}" && ps aux | grep "${APP_ID}" | grep -v grep | awk '{print $2}' | xargs kill -9
|
||||||
|
|
||||||
|
# 启动服务
|
||||||
|
nohup "${PROJECT_PATH}"/"${APP_ID}" --config_path="${CONFIG_PATH}" &
|
||||||
|
|
||||||
|
echo "${APP_ID}服务启动成功"
|
Loading…
x
Reference in New Issue
Block a user