Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gitlab-ci-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PublicSource
gitlab-ci-template
Commits
6e09ce50
Commit
6e09ce50
authored
May 06, 2023
by
张涵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化ci速度
parent
342e482d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
18 deletions
+9
-18
.gitlab-ci-vue-nvm-pnpm-vite.yml
.gitlab-ci-vue-nvm-pnpm-vite.yml
+4
-8
.gitlab-ci-vue-nvm-pnpm.yml
.gitlab-ci-vue-nvm-pnpm.yml
+5
-10
No files found.
.gitlab-ci-vue-nvm-pnpm-vite.yml
View file @
6e09ce50
...
@@ -39,14 +39,12 @@ check_and_cicd:
...
@@ -39,14 +39,12 @@ check_and_cicd:
tags
:
tags
:
-
runner-vue
-
runner-vue
script
:
script
:
# NVM Node版本管理器切换版本
# 打印Ng目录别名
-
'
[[
-n
$Node_VERSION
]]
&&
nvm
use
$Node_VERSION'
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
-
node -v
# fnm Node版本管理器切换版本
-
'
[[
-n
$Node_VERSION
]]
&&
fnm
use
$Node_VERSION'
# 安装依赖
# 安装依赖
-
pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/
-
pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/
# 代码检测
# - 'pnpm run check-branch-reconst || echo "" '
# - '[[ ${CI_BUILD_REF_NAME} != "dev" ]] && echo "安装、检测完成!" && exit 0 || echo "开始编译、部署,请稍等..."'
# 编译
# 编译
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
-
'
[[
${IsVite}
=
"true"
]]
&&
PathType="base"
||
PathType="assetPath"'
-
'
[[
${IsVite}
=
"true"
]]
&&
PathType="base"
||
PathType="assetPath"'
...
@@ -59,5 +57,3 @@ check_and_cicd:
...
@@ -59,5 +57,3 @@ check_and_cicd:
-
"
webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
-
"
webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
-
mkdir -p ${webpath}
-
mkdir -p ${webpath}
-
rsync -azv --delete dist/ ${webpath}
-
rsync -azv --delete dist/ ${webpath}
-
rm -rf node_modules dist
-
echo "WEB部署目录:"${webpath}
.gitlab-ci-vue-nvm-pnpm.yml
View file @
6e09ce50
...
@@ -39,16 +39,13 @@ check_and_cicd:
...
@@ -39,16 +39,13 @@ check_and_cicd:
tags
:
tags
:
-
runner-vue
-
runner-vue
script
:
script
:
# NVM Node版本管理器切换版本
# 打印Ng目录别名
-
'
[[
-n
$Node_VERSION
]]
&&
nvm
use
$Node_VERSION'
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
-
node -v
# fnm Node版本管理器切换版本
-
'
[[
-n
$Node_VERSION
]]
&&
fnm
use
$Node_VERSION'
# 安装依赖
# 安装依赖
-
pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/
-
pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/
# 代码检测
# - 'pnpm run check-branch-reconst || echo "" '
# - '[[ ${CI_BUILD_REF_NAME} != "dev" ]] && echo "安装、检测完成!" && exit 0 || echo "开始编译、部署,请稍等..."'
# 编译
# 编译
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
-
'
[[
${IsVite}
=
"true"
]]
&&
PathType="base"
||
PathType="assetPath"'
-
'
[[
${IsVite}
=
"true"
]]
&&
PathType="base"
||
PathType="assetPath"'
-
'
[[
${EnableOSS}
=
"true"
]]
&&
options="--
--${PathType}
https://rscdn.zmcms.cn/${NginxAliasDirectory}/"
||
options=""'
-
'
[[
${EnableOSS}
=
"true"
]]
&&
options="--
--${PathType}
https://rscdn.zmcms.cn/${NginxAliasDirectory}/"
||
options=""'
-
pnpm run build ${options}
-
pnpm run build ${options}
...
@@ -58,6 +55,4 @@ check_and_cicd:
...
@@ -58,6 +55,4 @@ check_and_cicd:
# 部署服务器
# 部署服务器
-
"
webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
-
"
webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
-
mkdir -p ${webpath}
-
mkdir -p ${webpath}
-
rsync -azv --delete dist/ ${webpath}
-
rsync -azv --delete dist/ ${webpath}
-
rm -rf node_modules dist
\ No newline at end of file
-
echo "WEB部署目录:"${webpath}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment