frontend-ci: 公司内部一套统一的ci流程

公司内部使用的一套统一的前端 ci 流程
更新于: 2023-11-15 18:48:50
项目主页: https://git.saybot.net/aric.zheng/frontend-ci

使用

初始化 .gitlab-ci.yml 写入以下内容

场景代码
react-oss,单bucket,单任务模式
include:
  # use frontend-ci
  - project: aric.zheng/frontend-ci
    ref: master
    file: dist/templates/react-oss/main.yml

variables:
  NODE_VERSION: 16.20.2
  BUCKET_CONTEXT: web-alo7-com/wx-exercise-preview-h5
react-oss,单bucket,多任务模式
include:
  - project: aric.zheng/frontend-ci
    ref: 1.0.147
    file: src/templates/react-aliyun-oss/main-single.yml

variables:
  NODE_VERSION: 16.20.2
  BUCKET_CONTEXT: web-alo7-com/ai-chatbot-frontend
  FRONTEND_PATH_BUILD: dist
  REFRESH_URL_beta: YOUR_PREVIE_URL.beta
  REFRESH_URL_production: YOUR_PREVIE_URL.prod
react-oss 多 bucket 方案,多任务模式
include:
  - project: aric.zheng/frontend-ci
    ref: 1.0.147
    file: src/templates/react-aliyun-oss/main-multiple.yml

variables:
  NODE_VERSION: 16.20.2
  BUCKET_CONTEXT_beta: on-site-exam-beta
  BUCKET_CONTEXT_production: on-site-exam-production