Compare commits
No commits in common. "4bccaac006ce21ab4eca58d9246901419821b874" and "341e481cf5ee66c81ecbbf979f7c9f60b462eec1" have entirely different histories.
4bccaac006
...
341e481cf5
|
@ -1,5 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
|
- lock
|
||||||
- build
|
- build
|
||||||
|
- unlock
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
GOPROXY: "https://goproxy.cn,direct"
|
GOPROXY: "https://goproxy.cn,direct"
|
||||||
|
@ -18,6 +20,19 @@ cache:
|
||||||
- ${GOPATH}/pkg/mod
|
- ${GOPATH}/pkg/mod
|
||||||
- ${GOPATH}/bin
|
- ${GOPATH}/bin
|
||||||
|
|
||||||
|
# 锁定作业,防止并发流水线执行
|
||||||
|
lock_job:
|
||||||
|
stage: lock
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
if [ -f /tmp/ci_lock_$CI_COMMIT_REF_NAME ]; then
|
||||||
|
echo "流水线($CI_COMMIT_REF_NAME)已在运行,等待..."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
touch /tmp/ci_lock_$CI_COMMIT_REF_NAME
|
||||||
|
echo "获得锁定,开始流水线($CI_COMMIT_REF_NAME)。"
|
||||||
|
fi
|
||||||
|
|
||||||
build-job:
|
build-job:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
|
@ -110,3 +125,11 @@ build-job:
|
||||||
# 触发部署
|
# 触发部署
|
||||||
- echo "触发部署"
|
- echo "触发部署"
|
||||||
- "curl -X POST --fail -F token=$SERVER_CI_TOKEN -F ref=release -F variables[ServerName]=$ServerName https://git.pogorockgames.com/api/v4/projects/31/trigger/pipeline"
|
- "curl -X POST --fail -F token=$SERVER_CI_TOKEN -F ref=release -F variables[ServerName]=$ServerName https://git.pogorockgames.com/api/v4/projects/31/trigger/pipeline"
|
||||||
|
|
||||||
|
# 解锁作业,释放锁定
|
||||||
|
unlock_job:
|
||||||
|
stage: unlock
|
||||||
|
script:
|
||||||
|
- rm -f /tmp/ci_lock_$CI_COMMIT_REF_NAME
|
||||||
|
- echo "释放锁定,流水线结束(/$CI_COMMIT_REF_NAME)。"
|
||||||
|
when: always
|
|
@ -41,7 +41,7 @@ const (
|
||||||
ThirteenWaterSceneWaitTimeout = time.Second * 2 //等待倒计时
|
ThirteenWaterSceneWaitTimeout = time.Second * 2 //等待倒计时
|
||||||
ThirteenWaterStartTimeout = time.Second * 3 //开始倒计时
|
ThirteenWaterStartTimeout = time.Second * 3 //开始倒计时
|
||||||
ThirteenWaterSendCardsTimeout = time.Second * 3 //开始发牌
|
ThirteenWaterSendCardsTimeout = time.Second * 3 //开始发牌
|
||||||
ThirteenWaterOptCardTimeout = time.Second * 48 //48选牌换牌
|
ThirteenWaterOptCardTimeout = time.Second * 45 //45选牌换牌
|
||||||
ThirteenWaterShowCardsTimeout = time.Second * 1 //轮流看牌时间
|
ThirteenWaterShowCardsTimeout = time.Second * 1 //轮流看牌时间
|
||||||
ThirteenWaterHitTimeout = time.Second * 2 //打枪
|
ThirteenWaterHitTimeout = time.Second * 2 //打枪
|
||||||
ThirteenWaterBilledTimeout = time.Second * 5 //结算
|
ThirteenWaterBilledTimeout = time.Second * 5 //结算
|
||||||
|
|
Loading…
Reference in New Issue