加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.gitlab-ci.yml 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
libin 提交于 2023-11-06 11:13 . feat:init提交
before_script:
- env
- pwd
- which node
- node -v
- yarn -v
- whoami
- export SDK_ENV=${SDK_ENV-dev}
stages:
- install
- execute
- deploy
- production
cache:
paths:
- dist
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "2"
打包:
stage: execute
cache:
paths:
- dist
- node_modules
only:
refs:
- develop
- /^release\/*/
script:
- |
{
if [[ ! -z $BRANCH ]];
then
git checkout $BRANCH
git pull
fi
}
- echo $SDK_ENV
- export SASS_BINARY_SITE=http://npm.mirrors.dg.com/dist/node-sass
- yarn install --registry=http://npm.mirrors.dg.com
- |
{
if [[ $CI_BUILD_REF_NAME =~ 'release/' ]]; then
echo '生产构建'
npm run build:prod
else
npm run build:test
fi
export NOTIFY_TEXT="SUCCESS 🤡🤡🤡"
export NOTIFY_COLOR="info"
} || {
export NOTIFY_TEXT="FAIL 😭😭😭"
export NOTIFY_COLOR="warning"
}
- "curl rsync-cache-server.default.svc.cluster.local/ystReport.sh | bash"
tags:
- linux
生产产物:
stage: production
only:
refs:
- /^release\/*/
when: on_success
script:
- export DEPLOY_NAME=$DEPLOY_NAME
- |
{
if [[ -z $DEPLOY_NAME ]]; then
export DEPLOY_NAME=$CI_PROJECT_NAME
fi
}
- mv dist $DEPLOY_NAME
artifacts:
name: "$DEPLOY_NAME-$CI_COMMIT_REF_SLUG"
paths:
- $DEPLOY_NAME
expire_in: 1 week
tags:
- linux
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化