fix: fix gitlab-ci.yml
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
stages:
|
||||
- gen_git-log
|
||||
- build_project
|
||||
# - build_image
|
||||
- build_image
|
||||
|
||||
cache:
|
||||
key:
|
||||
@@ -17,7 +17,7 @@ before_script:
|
||||
generate_git-log:
|
||||
stage: gen_git-log
|
||||
script:
|
||||
- if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i '/<body>/ a <a style="position:fixed;bottom:20px;left:40px;z-index:999;color:white;" target="_blank" href="./git-log.html">更新记录</a>' ./public/index.html; echo "添加更新记录链接"; fi;
|
||||
- if (( `grep git-log.html ./public/index.html | wc -l` == 0 )); then sed -i '/<body>/ a <a style="position:fixed;bottom:20px;left:40px;z-index:999;color:#000;" target="_blank" href="./git-log.html">更新记录</a>' ./public/index.html; echo "添加更新记录链接"; fi;
|
||||
- echo "最近的100个提交记录"
|
||||
- echo "<pre>" > ./public/git-log.html
|
||||
- "git log -100 --pretty=format:'%ad : %s' >> ./public/git-log.html"
|
||||
@@ -46,18 +46,17 @@ build_project:
|
||||
tags:
|
||||
- GN-XXG-Server
|
||||
|
||||
#build_image:
|
||||
#stage: build_image
|
||||
#script:
|
||||
# - echo "docker build"
|
||||
# - sudo docker build -t dev_cn-ui:$UI_TAG .
|
||||
# - echo "docker tag"
|
||||
#- sudo docker tag dev_cn-ui:$UI_TAG 192.168.40.153:9080/cyber-narrator/dev_cn-ui:$UI_TAG
|
||||
#- echo "docker push"
|
||||
# - sudo docker push 192.168.40.153:9080/cyber-narrator/dev_cn-ui:$UI_TAG
|
||||
#when: on_success
|
||||
#only:
|
||||
# - dev-cicd
|
||||
# tags:
|
||||
# - GN-XXG-Server
|
||||
|
||||
build_image:
|
||||
stage: build_image
|
||||
script:
|
||||
- echo "docker build"
|
||||
- sudo docker build -t dev_cn-ui:$UI_TAG .
|
||||
- echo "docker tag"
|
||||
- sudo docker tag dev_cn-ui:$UI_TAG 192.168.40.153:9080/cyber-narrator/dev_cn-ui:$UI_TAG
|
||||
- echo "docker push"
|
||||
- sudo docker push 192.168.40.153:9080/cyber-narrator/dev_cn-ui:$UI_TAG
|
||||
when: on_success
|
||||
only:
|
||||
- dev-cicd
|
||||
tags:
|
||||
- GN-XXG-Server
|
||||
|
||||
Reference in New Issue
Block a user