1 Star 0 Fork 51

宋凯伦/xuxiaowei-cloud

forked from xuxiaowei-cloud/xuxiaowei-cloud
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
service.yml 20.08 KB
一键复制 编辑 原始数据 按行查看 历史
徐晓伟 提交于 2022-07-09 18:22 . :boom:从 OAuth 2.0 升级到 OAuth 2.1
#
# s2 发布网关服务
s2-gateway:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- MODULE='gateway'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s2
only:
- s2
#
# s2 发布监控(管理)服务
s2-admin-server:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- MODULE='admin-server'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s2
only:
- s2
#
# s2 发布登录服务
s2-passport:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- MODULE='passport'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s2
only:
- s2
#
# s2 发布MySQL二进制订阅服务
s2-canal:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- cd resource-services-parent
- pwd
- MODULE='canal'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s2
only:
- s2
#
# s2 发布用户服务
s2-user:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- cd resource-services-parent
- pwd
- MODULE='user'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s2
only:
- s2
#
# s1 发布WebSocket服务
s1-websocket:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- cd resource-services-parent
- pwd
- MODULE='websocket'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s1
only:
- s2
#
# s1 发布WebService服务
s1-webservice:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- cd resource-services-parent
- pwd
- MODULE='webservice'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s1
only:
- s2
#
# s1 发布微信小程序服务
s1-wechat-miniprogram:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- cd resource-services-parent
- pwd
- MODULE='wechat-miniprogram'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s1
only:
- s2
#
# s1 发布 XXL Job
s1-xxl-job-admin:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- JAR_PATH=/home/gitlab-runner/jar/$CI_COMMIT_BRANCH
- echo JAR_PATH:$JAR_PATH
- if [ ! -f $JAR_PATH ]; then sudo mkdir $JAR_PATH -p && echo 创建发布文件夹完成; fi
- MODULE='xxl-job-admin'
- echo MODULE:$MODULE
- ARTIFACT_ID=`mvn -e -U help:evaluate -pl $MODULE -Dexpression=project.artifactId -q -DforceStdout`
- VERSION=`mvn help:evaluate -pl $MODULE -Dexpression=project.version -q -DforceStdout`
- PACKAGING=`mvn help:evaluate -pl $MODULE -Dexpression=project.packaging -q -DforceStdout`
- APP_NAME=$ARTIFACT_ID-$VERSION.$PACKAGING
- echo APP_NAME:$APP_NAME
- cp $MODULE/target/$APP_NAME $JAR_PATH/$APP_NAME && echo 复制新jar包完成
- SERVICE=/usr/lib/systemd/system/$MODULE.service
- echo SERVICE:$SERVICE
- JAVA_HOME=/software/dragonwell-8.10.11
- echo JAVA_HOME:$JAVA_HOME
- echo "" > $SERVICE
- echo "[Unit]" >> $SERVICE
- echo "Description=$MODULE" >> $SERVICE
- echo "After=syslog.target" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Service]" >> $SERVICE
- echo "EnvironmentFile=/etc/profile" >> $SERVICE
- echo "ExecStart=$JAVA_HOME/bin/java -jar $JAR_PATH/$APP_NAME --spring.profiles.active=prod" >> $SERVICE
- echo "" >> $SERVICE
- echo "[Install]" >> $SERVICE
- echo "WantedBy=multi-user.target" >> $SERVICE
- echo "" >> $SERVICE
- echo 创建新启动脚本完成
- sudo systemctl enable $MODULE.service && echo 设置开机启动完成
- sudo systemctl daemon-reload
- sudo systemctl restart $MODULE.service && echo 重启项目完成
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
- MODULE_STATUS=0
- sleep 30 && echo 增加延时
- sudo systemctl status $MODULE.service && MODULE_STATUS=1
- if [ "$MODULE_STATUS" == "1" ]; then echo '延时查看项目状态成功'; else echo '查看项目状态失败' && xxxx; fi
tags:
- s1
only:
- s2
#
# s2 发布UI服务
s2-ui:
stage: s2-service
needs:
- job: s2-package
artifacts: true
script:
- MODULE='ui'
- echo MODULE:$MODULE
- RELEASE_PATH=/home/gitlab-runner/node/$MODULE
- if [ ! -f $RELEASE_PATH ]; then sudo mkdir $RELEASE_PATH -p && echo 创建文件夹完成; fi
- echo RELEASE_PATH:$RELEASE_PATH
- if [ ! -f $RELEASE_PATH ]; then sudo mkdir $RELEASE_PATH -p && echo 创建发布文件夹完成; fi
- cp -r ./$MODULE/dist/* $RELEASE_PATH && echo 复制新文件夹完成
tags:
- s2
only:
- s2
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/NuoBiaoZha/xuxiaowei-cloud.git
git@gitee.com:NuoBiaoZha/xuxiaowei-cloud.git
NuoBiaoZha
xuxiaowei-cloud
xuxiaowei-cloud
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385