datakeen-session-react 1.1.134-dev.3 → 1.1.135-dev.3
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 +45 -79
- package/package.json +1 -1
package/.gitlab-ci.yml
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
workflow:
|
|
2
|
+
rules:
|
|
3
|
+
# Force pipeline sur les Merge Requests
|
|
4
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
5
|
+
# Pipeline sur les branches protégées
|
|
6
|
+
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
7
|
+
- if: '$CI_COMMIT_BRANCH == "staging"'
|
|
8
|
+
- if: '$CI_COMMIT_BRANCH == "dev"'
|
|
9
|
+
# Sinon, pas de pipeline (évite les doublons)
|
|
10
|
+
|
|
1
11
|
stages:
|
|
2
12
|
- test
|
|
3
13
|
- lint
|
|
@@ -21,19 +31,14 @@ cache:
|
|
|
21
31
|
test:
|
|
22
32
|
stage: test
|
|
23
33
|
image: node:20
|
|
24
|
-
cache:
|
|
25
|
-
key:
|
|
26
|
-
files:
|
|
27
|
-
- package-lock.json
|
|
28
|
-
paths:
|
|
29
|
-
- node_modules/
|
|
30
34
|
script:
|
|
31
35
|
- npm ci
|
|
32
36
|
- echo "[TODO] TESTS"
|
|
33
37
|
rules:
|
|
34
38
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
35
|
-
-
|
|
36
|
-
|
|
39
|
+
- if: '$CI_COMMIT_BRANCH == "dev"'
|
|
40
|
+
- if: '$CI_COMMIT_BRANCH == "staging"'
|
|
41
|
+
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
37
42
|
|
|
38
43
|
############################################
|
|
39
44
|
# #
|
|
@@ -44,19 +49,14 @@ test:
|
|
|
44
49
|
lint:
|
|
45
50
|
stage: lint
|
|
46
51
|
image: node:20
|
|
47
|
-
cache:
|
|
48
|
-
key:
|
|
49
|
-
files:
|
|
50
|
-
- package-lock.json
|
|
51
|
-
paths:
|
|
52
|
-
- node_modules/
|
|
53
52
|
script:
|
|
54
53
|
- npm ci
|
|
55
54
|
- npm run lint || true
|
|
56
55
|
rules:
|
|
57
56
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
58
|
-
-
|
|
59
|
-
|
|
57
|
+
- if: '$CI_COMMIT_BRANCH == "dev"'
|
|
58
|
+
- if: '$CI_COMMIT_BRANCH == "staging"'
|
|
59
|
+
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
60
60
|
needs:
|
|
61
61
|
- test
|
|
62
62
|
|
|
@@ -69,12 +69,6 @@ lint:
|
|
|
69
69
|
build:
|
|
70
70
|
stage: build
|
|
71
71
|
image: node:20
|
|
72
|
-
cache:
|
|
73
|
-
key:
|
|
74
|
-
files:
|
|
75
|
-
- package-lock.json
|
|
76
|
-
paths:
|
|
77
|
-
- node_modules/
|
|
78
72
|
script:
|
|
79
73
|
- npm ci
|
|
80
74
|
- npm run build
|
|
@@ -84,14 +78,12 @@ build:
|
|
|
84
78
|
- package.json
|
|
85
79
|
expire_in: 30 days
|
|
86
80
|
rules:
|
|
87
|
-
|
|
88
|
-
# needs:
|
|
89
|
-
# - lint
|
|
81
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
90
82
|
- if: '$CI_COMMIT_BRANCH == "dev"'
|
|
91
83
|
- if: '$CI_COMMIT_BRANCH == "staging"'
|
|
92
84
|
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
needs:
|
|
86
|
+
- lint
|
|
95
87
|
|
|
96
88
|
#################################################
|
|
97
89
|
# #
|
|
@@ -107,35 +99,26 @@ publish:main:
|
|
|
107
99
|
variables:
|
|
108
100
|
NPM_CONFIG_PROVENANCE: "false"
|
|
109
101
|
|
|
110
|
-
# OIDC Configuration
|
|
111
102
|
id_tokens:
|
|
112
103
|
NPM_ID_TOKEN:
|
|
113
104
|
aud: "npm:registry.npmjs.org"
|
|
114
|
-
SIGSTORE_ID_TOKEN:
|
|
115
|
-
aud: sigstore
|
|
116
105
|
|
|
117
106
|
environment:
|
|
118
107
|
name: npm
|
|
119
108
|
url: https://www.npmjs.com/package/datakeen-session-react
|
|
120
109
|
|
|
121
110
|
script:
|
|
122
|
-
- git config user.email "ci@
|
|
123
|
-
- git config user.name "CI
|
|
111
|
+
- git config user.email "ci@datakeen.io"
|
|
112
|
+
- git config user.name "Datakeen CI"
|
|
124
113
|
- git remote set-url origin https://${CI_PUSH_USER}:${CI_PUSH_TOKEN}@gitlab.com/datakeenteam/teamfullstack/client-sessions-react-sdk.git
|
|
125
|
-
|
|
126
|
-
# Update npm
|
|
127
114
|
- npm install -g npm@latest
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
- git push origin HEAD:main
|
|
133
|
-
- git push origin --tags
|
|
134
|
-
|
|
135
|
-
# Auth dynamique & Publish
|
|
115
|
+
- 'npm version patch -m "chore(release): %s"'
|
|
116
|
+
- git push -o ci.skip origin HEAD:main
|
|
117
|
+
- git push -o ci.skip origin --tags
|
|
136
118
|
- npm publish --access public
|
|
137
|
-
|
|
138
|
-
|
|
119
|
+
|
|
120
|
+
rules:
|
|
121
|
+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE != "merge_request_event"'
|
|
139
122
|
needs:
|
|
140
123
|
- build
|
|
141
124
|
|
|
@@ -147,35 +130,26 @@ publish:staging:
|
|
|
147
130
|
variables:
|
|
148
131
|
NPM_CONFIG_PROVENANCE: "false"
|
|
149
132
|
|
|
150
|
-
# OIDC Configuration
|
|
151
133
|
id_tokens:
|
|
152
134
|
NPM_ID_TOKEN:
|
|
153
135
|
aud: "npm:registry.npmjs.org"
|
|
154
|
-
SIGSTORE_ID_TOKEN:
|
|
155
|
-
aud: sigstore
|
|
156
136
|
|
|
157
137
|
environment:
|
|
158
138
|
name: npm
|
|
159
|
-
url: https://www.npmjs.com/package/datakeen-session-react
|
|
139
|
+
url: https://www.npmjs.com/package/datakeen-session-react?activeTab=versions
|
|
160
140
|
|
|
161
141
|
script:
|
|
162
|
-
- git config user.email "ci@
|
|
163
|
-
- git config user.name "CI
|
|
142
|
+
- git config user.email "ci@datakeen.io"
|
|
143
|
+
- git config user.name "Datakeen CI"
|
|
164
144
|
- git remote set-url origin https://${CI_PUSH_USER}:${CI_PUSH_TOKEN}@gitlab.com/datakeenteam/teamfullstack/client-sessions-react-sdk.git
|
|
165
|
-
|
|
166
|
-
# Update npm
|
|
167
145
|
- npm install -g npm@latest
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
- git push origin HEAD:staging
|
|
173
|
-
- git push origin --tags
|
|
174
|
-
|
|
175
|
-
# Auth dynamique & Publish sur le tag RC
|
|
146
|
+
- 'npm version prerelease --preid=rc -m "chore(release): %s"'
|
|
147
|
+
- git push -o ci.skip origin HEAD:staging
|
|
148
|
+
- git push -o ci.skip origin --tags
|
|
176
149
|
- npm publish --access public --tag rc
|
|
177
|
-
|
|
178
|
-
|
|
150
|
+
|
|
151
|
+
rules:
|
|
152
|
+
- if: '$CI_COMMIT_BRANCH == "staging" && $CI_PIPELINE_SOURCE != "merge_request_event"'
|
|
179
153
|
needs:
|
|
180
154
|
- build
|
|
181
155
|
|
|
@@ -187,33 +161,25 @@ publish:dev:
|
|
|
187
161
|
variables:
|
|
188
162
|
NPM_CONFIG_PROVENANCE: "false"
|
|
189
163
|
|
|
190
|
-
# OIDC Configuration
|
|
191
164
|
id_tokens:
|
|
192
165
|
NPM_ID_TOKEN:
|
|
193
166
|
aud: "npm:registry.npmjs.org"
|
|
194
|
-
SIGSTORE_ID_TOKEN:
|
|
195
|
-
aud: sigstore
|
|
196
167
|
|
|
197
168
|
environment:
|
|
198
169
|
name: npm
|
|
199
|
-
url: https://www.npmjs.com/package/datakeen-session-react
|
|
170
|
+
url: https://www.npmjs.com/package/datakeen-session-react?activeTab=versions
|
|
200
171
|
|
|
201
172
|
script:
|
|
202
|
-
- git config user.email "ci@
|
|
203
|
-
- git config user.name "CI
|
|
173
|
+
- git config user.email "ci@datakeen.io"
|
|
174
|
+
- git config user.name "Datakeen CI"
|
|
204
175
|
- git remote set-url origin https://${CI_PUSH_USER}:${CI_PUSH_TOKEN}@gitlab.com/datakeenteam/teamfullstack/client-sessions-react-sdk.git
|
|
205
|
-
|
|
206
|
-
# Update npm
|
|
207
176
|
- npm install -g npm@latest
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
|
|
212
|
-
- git push origin HEAD:dev
|
|
213
|
-
- git push origin --tags
|
|
214
|
-
|
|
177
|
+
- 'npm version prerelease --preid=dev -m "chore(release): %s"'
|
|
178
|
+
- git push -o ci.skip origin HEAD:dev
|
|
179
|
+
- git push -o ci.skip origin --tags
|
|
215
180
|
- npm publish --access public --tag dev
|
|
216
|
-
|
|
217
|
-
|
|
181
|
+
|
|
182
|
+
rules:
|
|
183
|
+
- if: '$CI_COMMIT_BRANCH == "dev" && $CI_PIPELINE_SOURCE != "merge_request_event"'
|
|
218
184
|
needs:
|
|
219
185
|
- build
|