Commit 43fd2131 authored by 吴军's avatar 吴军

更新.gitlab-ci-oss.yml

parent 81035f1c
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# variables: # variables:
# NginxAliasDirectory: bakingCenter # NginxAliasDirectory: bakingCenter
variables:
OssBucket: zmcms-cn-vue
stages: stages:
- cicd - cicd
...@@ -21,6 +23,6 @@ cicd: ...@@ -21,6 +23,6 @@ cicd:
- '[[ -z ${NginxAliasDirectory} ]] && exit 1' - '[[ -z ${NginxAliasDirectory} ]] && exit 1'
- echo -e "NginxAliasDirectory:${NginxAliasDirectory}" - echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
# 部署OSS # 部署OSS
- 'ossutil64 cp -rf dist/ oss://zmcms-cn-vue/${NginxAliasDirectory} --exclude "*.html" --exclude ".htaccess" --exclude ".gitlab-ci.yml" --exclude "README.md" --exclude ".git" --exclude "ossutil_output" && echo "推送对象存储成功!"' - 'ossutil64 cp -rf dist/ oss://${OssBucket}/${NginxAliasDirectory} --exclude "*.html" --exclude ".htaccess" --exclude ".gitlab-ci.yml" --exclude "README.md" --exclude ".git" --exclude "ossutil_output" && echo "推送对象存储成功!"'
- '[[ $? != 0 ]] && echo "部署出错!" && exit 1' - '[[ $? != 0 ]] && echo "部署出错!" && exit 1'
- echo "已成功推送到对象存储"${NginxAliasDirectory}"目录下" - echo "已成功推送到对象存储"${NginxAliasDirectory}"目录下"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment