diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cdc080aa..a3245d22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ # 自定义生命周期 stages: + - gen_git-log - build_project - build_image @@ -14,6 +15,25 @@ cache: before_script: - export CNUI_TAG=$(date +%Y%m%d%H%M%S) +generate_git-log: + stage: gen_git-log + script: + - if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i 's++更新记录\n+g' ./public/index.html; echo "添加更新记录链接"; fi; + - echo "最近的100个提交记录" + - echo "
" > ./public/git-log.html
+    - "git log -100 --pretty=format:'%ad : %s' >> ./public/git-log.html"
+    - echo "
" >> ./public/git-log.html + - echo "处理 git-log.html 结束" + artifacts: + paths: + - public/index.html + - public/git-log.html + only: + - dev + tags: + - GN-XXG-Server + + build_project: stage: build_project script: