From 290b837f43693227c1b47d092d7ca1067ecd42df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=B0=B8=E5=BC=BA?= Date: Thu, 28 Oct 2021 01:12:27 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53c4473..f5ee4c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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