更新.gitlab-ci.yml文件
This commit is contained in:
@@ -8,6 +8,8 @@ variables:
|
||||
|
||||
# 指定git获取代码的方式(clone,fetch,none)
|
||||
GIT_STRATEGY: clone
|
||||
#获取当前时间戳
|
||||
DATE: $(date +%Y%m%d%H%I%s)
|
||||
|
||||
#在作业之前执行的脚本或命令
|
||||
before_script:
|
||||
@@ -47,6 +49,7 @@ stages:
|
||||
master_build:
|
||||
stage: build
|
||||
script:
|
||||
- echo $DATE
|
||||
- echo "正式服务器环境配置"
|
||||
- if [ ! -d ".git" ]; then
|
||||
- git clone -b master $GITLAB_SSH $GIT_CLONE_PATH --depth 1
|
||||
@@ -54,7 +57,6 @@ master_build:
|
||||
- git stash
|
||||
- fi
|
||||
- git pull
|
||||
- export DATE=$(date +%y.%m)
|
||||
- echo $DATE
|
||||
only:
|
||||
- master
|
||||
|
||||
Reference in New Issue
Block a user