@dazhicheng/common 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +56 -0
- package/package.json +1 -1
package/.gitlab-ci.yml
CHANGED
|
@@ -10,9 +10,12 @@ variables:
|
|
|
10
10
|
.build_template: &build_template
|
|
11
11
|
stage: build
|
|
12
12
|
image: node:20-alpine
|
|
13
|
+
tags:
|
|
14
|
+
- build
|
|
13
15
|
script:
|
|
14
16
|
- npm install -g pnpm
|
|
15
17
|
- pnpm install
|
|
18
|
+
- pnpm up:dzc
|
|
16
19
|
- pnpm "build:${NODE_ENV}"
|
|
17
20
|
artifacts:
|
|
18
21
|
paths:
|
|
@@ -44,4 +47,57 @@ MR 构建验证:
|
|
|
44
47
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"
|
|
45
48
|
|
|
46
49
|
# 项目级 deploy jobs 注入点 ------------------------------------------------
|
|
50
|
+
构建_dev:
|
|
51
|
+
<<: *build_template
|
|
52
|
+
variables:
|
|
53
|
+
NODE_ENV: dev
|
|
54
|
+
rules:
|
|
55
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"
|
|
56
|
+
- if: $CI_COMMIT_BRANCH == "develop"
|
|
57
|
+
|
|
58
|
+
构建_test:
|
|
59
|
+
<<: *build_template
|
|
60
|
+
variables:
|
|
61
|
+
NODE_ENV: test
|
|
62
|
+
only: [test]
|
|
63
|
+
|
|
64
|
+
开发环境发版:
|
|
65
|
+
<<: *deploy_template
|
|
66
|
+
needs: [构建_dev]
|
|
67
|
+
tags: [develop]
|
|
68
|
+
resource_group: deploy-develop
|
|
69
|
+
variables:
|
|
70
|
+
NODE_ENV: dev
|
|
71
|
+
<<<开发环境发版>>>
|
|
72
|
+
only: [develop]
|
|
73
|
+
|
|
74
|
+
开发环境发版_107:
|
|
75
|
+
<<: *deploy_template
|
|
76
|
+
needs: [构建_dev]
|
|
77
|
+
tags: [develop_107]
|
|
78
|
+
resource_group: deploy-develop_107
|
|
79
|
+
variables:
|
|
80
|
+
NODE_ENV: dev
|
|
81
|
+
<<<开发环境发版_107>>>
|
|
82
|
+
only: [develop]
|
|
83
|
+
|
|
84
|
+
测试环境发版:
|
|
85
|
+
<<: *deploy_template
|
|
86
|
+
needs: [构建_test]
|
|
87
|
+
tags: [test]
|
|
88
|
+
resource_group: deploy-test
|
|
89
|
+
variables:
|
|
90
|
+
NODE_ENV: test
|
|
91
|
+
<<<测试环境发版>>>
|
|
92
|
+
only: [test]
|
|
93
|
+
|
|
94
|
+
测试环境发版_107:
|
|
95
|
+
<<: *deploy_template
|
|
96
|
+
needs: [构建_test]
|
|
97
|
+
tags: [test_107]
|
|
98
|
+
resource_group: deploy-test_107
|
|
99
|
+
variables:
|
|
100
|
+
NODE_ENV: test
|
|
101
|
+
<<<测试环境发版_107>>>
|
|
102
|
+
only: [test]
|
|
47
103
|
<<<deploy_jobs>>>
|