@unisphere/nx 4.15.6 → 4.15.8
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/dist/generators/add-application/add-application.d.ts.map +1 -1
- package/dist/generators/add-application/add-application.js +8 -9
- package/dist/generators/add-application/templates/default/src/app/app.tsx.template +1 -1
- package/dist/generators/add-documentation/templates/src/components/introductions/hello-world-experience.tsx +4 -1
- package/dist/migrations/4-15-8/templates/_publish-artifacts.template +361 -0
- package/dist/migrations/4-15-8/update-publish-artifacts-workflow.d.ts +8 -0
- package/dist/migrations/4-15-8/update-publish-artifacts-workflow.d.ts.map +1 -0
- package/dist/migrations/4-15-8/update-publish-artifacts-workflow.js +40 -0
- package/migrations.json +19 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-application.d.ts","sourceRoot":"","sources":["../../../src/generators/add-application/add-application.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,
|
|
1
|
+
{"version":3,"file":"add-application.d.ts","sourceRoot":"","sources":["../../../src/generators/add-application/add-application.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAsC,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAwEzD,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,6BAA6B,uBA4KvC;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -115,16 +115,17 @@ async function addApplicationGenerator(tree, options) {
|
|
|
115
115
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, templatePath), projectRoot, templateVariables);
|
|
116
116
|
// For local-dev-playground apps, generate setup-local-runtimes.ts
|
|
117
117
|
if (isPlayground) {
|
|
118
|
-
const rawConfig = (0, devkit_1.readJson)(tree, '.unisphere');
|
|
119
|
-
const experienceName = `unisphere.${rawConfig.type}.${rawConfig.name}`;
|
|
120
118
|
const setupLocalRuntimesContent = `export function setupLocalRuntimes() {
|
|
121
119
|
if (!process.env.LOCAL_RUNTIMES) return;
|
|
122
120
|
|
|
123
|
-
const runtimes: Record<string, { token: string; baseEnvName: string }
|
|
121
|
+
const runtimes: Record<string, Record<string, { token: string; baseEnvName: string }>> = {};
|
|
124
122
|
process.env.LOCAL_RUNTIMES.split(',').forEach((entry) => {
|
|
125
|
-
const [name, port] = entry.split('@');
|
|
126
|
-
if (name && port) {
|
|
127
|
-
runtimes[
|
|
123
|
+
const [experience, name, port] = entry.split('@');
|
|
124
|
+
if (experience && name && port) {
|
|
125
|
+
if (!runtimes[experience]) {
|
|
126
|
+
runtimes[experience] = {};
|
|
127
|
+
}
|
|
128
|
+
runtimes[experience][name] = { token: port, baseEnvName: '' };
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
131
|
|
|
@@ -133,9 +134,7 @@ async function addApplicationGenerator(tree, options) {
|
|
|
133
134
|
mode: 'integration',
|
|
134
135
|
options: { verbose: 'inherit' },
|
|
135
136
|
baseEnvScope: { core: 'inherit', presets: 'inherit' },
|
|
136
|
-
runtimes
|
|
137
|
-
'${experienceName}': runtimes,
|
|
138
|
-
},
|
|
137
|
+
runtimes,
|
|
139
138
|
};
|
|
140
139
|
|
|
141
140
|
(window as any).unisphereRuntimeOverrides = btoa(JSON.stringify(overrides));
|
|
@@ -66,7 +66,7 @@ export function App() {
|
|
|
66
66
|
visuals: [
|
|
67
67
|
<% if (!visualName) { %>/*<% } %>{
|
|
68
68
|
type: '<%= visualName ? visualName__camelCase : "~~provide-the-visual-name-to-mount-here~~" %>',
|
|
69
|
-
target: 'mainContainer',
|
|
69
|
+
target: { type: 'element', elementId: 'mainContainer' },
|
|
70
70
|
settings: {}<% if (visualName) { %> as <%= runtimeName__pascalCase %>Runtime<%= visualName__pascalCase %>VisualSettings<% } %>
|
|
71
71
|
}<% if (!visualName) { %>*/<% } %>
|
|
72
72
|
],
|
|
@@ -18,7 +18,10 @@ export const HelloWorldExperience = ({ preload }: { preload?: boolean }) => {
|
|
|
18
18
|
if (runtime) {
|
|
19
19
|
const { unsubscribe } = runtime.mountVisual({
|
|
20
20
|
type: 'docs',
|
|
21
|
-
target:
|
|
21
|
+
target: {
|
|
22
|
+
type: 'element',
|
|
23
|
+
elementId: 'hello-world-experience-container',
|
|
24
|
+
},
|
|
22
25
|
settings: {}
|
|
23
26
|
});
|
|
24
27
|
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
name: Shared Deployment Jobs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
check-elements:
|
|
8
|
+
runs-on:
|
|
9
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
10
|
+
- instance-size:small
|
|
11
|
+
outputs:
|
|
12
|
+
has_packages: ${{ steps.check.outputs.has_packages }}
|
|
13
|
+
has_runtimes: ${{ steps.check.outputs.has_runtimes }}
|
|
14
|
+
has_applications: ${{ steps.check.outputs.has_applications }}
|
|
15
|
+
steps:
|
|
16
|
+
|
|
17
|
+
- name: Checkout Repo
|
|
18
|
+
uses: actions/checkout@v5
|
|
19
|
+
with:
|
|
20
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
|
|
21
|
+
fetch-tags: true
|
|
22
|
+
|
|
23
|
+
- name: Check elements in .unisphere
|
|
24
|
+
id: check
|
|
25
|
+
run: |
|
|
26
|
+
if [ -f .unisphere ]; then
|
|
27
|
+
PACKAGES=$(jq -r '.elements.packages // {} | length' .unisphere)
|
|
28
|
+
RUNTIMES=$(jq -r '(.elements.runtimes // {} | length) + (.elements.workspace // {} | length) + (.elements.loader // {} | length)' .unisphere)
|
|
29
|
+
APPLICATIONS=$(jq -r '.elements.applications // {} | length' .unisphere)
|
|
30
|
+
|
|
31
|
+
if [ "$PACKAGES" -gt 0 ]; then
|
|
32
|
+
echo "has_packages=true" >> $GITHUB_OUTPUT
|
|
33
|
+
else
|
|
34
|
+
echo "has_packages=false" >> $GITHUB_OUTPUT
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
if [ "$RUNTIMES" -gt 0 ]; then
|
|
38
|
+
echo "has_runtimes=true" >> $GITHUB_OUTPUT
|
|
39
|
+
else
|
|
40
|
+
echo "has_runtimes=false" >> $GITHUB_OUTPUT
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
if [ "$APPLICATIONS" -gt 0 ]; then
|
|
44
|
+
echo "has_applications=true" >> $GITHUB_OUTPUT
|
|
45
|
+
else
|
|
46
|
+
echo "has_applications=false" >> $GITHUB_OUTPUT
|
|
47
|
+
fi
|
|
48
|
+
else
|
|
49
|
+
echo "has_packages=false" >> $GITHUB_OUTPUT
|
|
50
|
+
echo "has_runtimes=false" >> $GITHUB_OUTPUT
|
|
51
|
+
echo "has_applications=false" >> $GITHUB_OUTPUT
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
prepare-runtimes:
|
|
55
|
+
runs-on:
|
|
56
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
57
|
+
- instance-size:medium
|
|
58
|
+
|
|
59
|
+
if: needs.check-elements.outputs.has_runtimes == 'true'
|
|
60
|
+
needs: check-elements
|
|
61
|
+
outputs:
|
|
62
|
+
unisphereElementsArtifactsFolder: ${{ steps.prepare-runtimes.outputs.artifactsRootFolder }}
|
|
63
|
+
hasArtifacts: ${{ steps.prepare-runtimes.outputs.hasArtifacts }}
|
|
64
|
+
commit_sha: ${{ steps.capture_commit_sha.outputs.commit_sha }}
|
|
65
|
+
steps:
|
|
66
|
+
- name: Cache npm
|
|
67
|
+
uses: actions/cache@v5
|
|
68
|
+
with:
|
|
69
|
+
path: ~/.npm
|
|
70
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
71
|
+
restore-keys: |
|
|
72
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
73
|
+
|
|
74
|
+
- name: Checkout Repo
|
|
75
|
+
uses: actions/checkout@v5
|
|
76
|
+
with:
|
|
77
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
|
|
78
|
+
fetch-tags: true
|
|
79
|
+
- name: Setup Node.js
|
|
80
|
+
uses: actions/setup-node@v5
|
|
81
|
+
with:
|
|
82
|
+
node-version-file: '.nvmrc'
|
|
83
|
+
- name: Clean workspace
|
|
84
|
+
run: git reset --hard HEAD
|
|
85
|
+
- name: Clean npm cache
|
|
86
|
+
run: npm cache clean --force
|
|
87
|
+
|
|
88
|
+
- name: Setup JFrog
|
|
89
|
+
|
|
90
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
91
|
+
id: setup-jfrog
|
|
92
|
+
env:
|
|
93
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
94
|
+
with:
|
|
95
|
+
oidc-provider-name: ovp-github-oidc
|
|
96
|
+
- name: Install dependencies
|
|
97
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
98
|
+
env:
|
|
99
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
100
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
101
|
+
|
|
102
|
+
- name: Prepare Unisphere Elements
|
|
103
|
+
id: prepare-runtimes
|
|
104
|
+
run: npx unisphere runtime publish prepare --verbose
|
|
105
|
+
- name: Capture Commit SHA
|
|
106
|
+
id: capture_commit_sha
|
|
107
|
+
run: echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
|
108
|
+
- name: Set commit_sha as output
|
|
109
|
+
id: set_commit_sha
|
|
110
|
+
run: echo "commit_sha=${{ env.commit_sha }}" >> $GITHUB_OUTPUT
|
|
111
|
+
- uses: actions/upload-artifact@v6
|
|
112
|
+
id: upload-unisphere-elements-artifacts
|
|
113
|
+
with:
|
|
114
|
+
name: unisphere-elements
|
|
115
|
+
path: ${{ steps.prepare-runtimes.outputs.artifactsRootFolder }}
|
|
116
|
+
retention-days: 1
|
|
117
|
+
|
|
118
|
+
deploy-packages:
|
|
119
|
+
if: needs.check-elements.outputs.has_packages == 'true'
|
|
120
|
+
needs: check-elements
|
|
121
|
+
runs-on:
|
|
122
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
123
|
+
- instance-size:medium
|
|
124
|
+
steps:
|
|
125
|
+
- name: Cache npm
|
|
126
|
+
uses: actions/cache@v5
|
|
127
|
+
with:
|
|
128
|
+
path: ~/.npm
|
|
129
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
130
|
+
restore-keys: |
|
|
131
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
132
|
+
|
|
133
|
+
- name: Checkout Repo
|
|
134
|
+
uses: actions/checkout@v5
|
|
135
|
+
with:
|
|
136
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
|
|
137
|
+
fetch-tags: true
|
|
138
|
+
- name: Setup Node.js
|
|
139
|
+
uses: actions/setup-node@v5
|
|
140
|
+
with:
|
|
141
|
+
node-version-file: '.nvmrc'
|
|
142
|
+
|
|
143
|
+
- name: Setup JFrog
|
|
144
|
+
|
|
145
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
146
|
+
id: setup-jfrog
|
|
147
|
+
env:
|
|
148
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
149
|
+
with:
|
|
150
|
+
oidc-provider-name: ovp-github-oidc
|
|
151
|
+
|
|
152
|
+
- name: Install dependencies
|
|
153
|
+
|
|
154
|
+
run: |
|
|
155
|
+
npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
156
|
+
|
|
157
|
+
env:
|
|
158
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
159
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
160
|
+
|
|
161
|
+
- name: Get NPM Token from AWS Secrets Manager
|
|
162
|
+
id: get-npm-token
|
|
163
|
+
run: |
|
|
164
|
+
NPM_TOKEN=$(aws secretsmanager get-secret-value --secret-id arn:aws:secretsmanager:eu-central-1:785328604905:secret:unisphere-secrets-um86Cs --query SecretString --output text | jq -r '."NPM_UNISPHERE_TOKEN"')
|
|
165
|
+
echo "NPM_TOKEN=$NPM_TOKEN" >> $GITHUB_ENV
|
|
166
|
+
# Debug token existence (safely)
|
|
167
|
+
echo "::debug::Token exists: $([ ! -z "$NPM_TOKEN" ] && echo 'true' || echo 'false')"
|
|
168
|
+
- name: Deploy to registry
|
|
169
|
+
run: npx unisphere package publish --verbose --jfrogToken ${{ steps.setup-jfrog.outputs.oidc-token }} --jfrogUser ${{ steps.setup-jfrog.outputs.oidc-user }} --npmToken ${{ env.NPM_TOKEN }} --branch "${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}"
|
|
170
|
+
|
|
171
|
+
deploy-runtimes:
|
|
172
|
+
if: needs.prepare-runtimes.outputs.hasArtifacts == 'true'
|
|
173
|
+
needs: prepare-runtimes
|
|
174
|
+
runs-on:
|
|
175
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
176
|
+
- instance-size:medium
|
|
177
|
+
strategy:
|
|
178
|
+
matrix:
|
|
179
|
+
envs_regions:
|
|
180
|
+
- { env: 'nvp1', region: 'us-east-1', accountid: '583352821080' }
|
|
181
|
+
- { env: 'frp2', region: 'eu-central-1', accountid: '082111255551' }
|
|
182
|
+
- { env: 'irp2', region: 'eu-west-1', accountid: '137576761235' }
|
|
183
|
+
- { env: 'nvq2', region: 'us-east-1', accountid: '383697330906' }
|
|
184
|
+
- { env: 'syp2', region: 'ap-southeast-2', accountid: '650755435642' }
|
|
185
|
+
- { env: 'cap2', region: 'ca-central-1', accountid: '948632009361' }
|
|
186
|
+
fail-fast: false
|
|
187
|
+
|
|
188
|
+
steps:
|
|
189
|
+
- name: Cache npm
|
|
190
|
+
uses: actions/cache@v5
|
|
191
|
+
with:
|
|
192
|
+
path: ~/.npm
|
|
193
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
194
|
+
restore-keys: |
|
|
195
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
196
|
+
|
|
197
|
+
- name: Check available disk space
|
|
198
|
+
run: df -h
|
|
199
|
+
- name: Checkout Repo at specific commit
|
|
200
|
+
uses: actions/checkout@v5
|
|
201
|
+
with:
|
|
202
|
+
ref: ${{ needs.prepare-runtimes.outputs.commit_sha }}
|
|
203
|
+
fetch-tags: true
|
|
204
|
+
- name: Setup Node.js
|
|
205
|
+
uses: actions/setup-node@v5
|
|
206
|
+
with:
|
|
207
|
+
node-version-file: '.nvmrc'
|
|
208
|
+
|
|
209
|
+
- name: Setup JFrog
|
|
210
|
+
|
|
211
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
212
|
+
id: setup-jfrog
|
|
213
|
+
env:
|
|
214
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
215
|
+
with:
|
|
216
|
+
oidc-provider-name: ovp-github-oidc
|
|
217
|
+
|
|
218
|
+
- name: Install dependencies
|
|
219
|
+
|
|
220
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
221
|
+
env:
|
|
222
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
223
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
224
|
+
|
|
225
|
+
- name: Download artifacts folder
|
|
226
|
+
uses: actions/download-artifact@v7
|
|
227
|
+
with:
|
|
228
|
+
name: unisphere-elements
|
|
229
|
+
path: ${{ needs.prepare-runtimes.outputs.unisphereElementsArtifactsFolder }}
|
|
230
|
+
- name: Sync S3 bucket
|
|
231
|
+
run: |
|
|
232
|
+
npx unisphere runtime publish execute \
|
|
233
|
+
--env ${{ matrix.envs_regions.env }} \
|
|
234
|
+
--aws-region '${{ matrix.envs_regions.region }}' \
|
|
235
|
+
--aws-arn 'arn:aws:iam::${{matrix.envs_regions.accountid }}:role/${{ matrix.envs_regions.env }}-unisphere-content-role' \
|
|
236
|
+
--artifacts-folder '${{ needs.prepare-runtimes.outputs.unisphereElementsArtifactsFolder }}' \
|
|
237
|
+
--verbose
|
|
238
|
+
|
|
239
|
+
prepare-applications:
|
|
240
|
+
if: always() && needs.check-elements.outputs.has_applications == 'true'
|
|
241
|
+
needs: [deploy-runtimes, check-elements]
|
|
242
|
+
runs-on:
|
|
243
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
244
|
+
- instance-size:medium
|
|
245
|
+
outputs:
|
|
246
|
+
unisphereApplicationsArtifactsFolder: ${{ steps.prepare-applications.outputs.artifactsRootFolder }}
|
|
247
|
+
hasArtifacts: ${{ steps.prepare-applications.outputs.hasArtifacts }}
|
|
248
|
+
commit_sha: ${{ steps.capture_commit_sha.outputs.commit_sha }}
|
|
249
|
+
steps:
|
|
250
|
+
- name: Cache npm
|
|
251
|
+
uses: actions/cache@v5
|
|
252
|
+
with:
|
|
253
|
+
path: ~/.npm
|
|
254
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
255
|
+
restore-keys: |
|
|
256
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
257
|
+
|
|
258
|
+
- name: Checkout Repo
|
|
259
|
+
uses: actions/checkout@v5
|
|
260
|
+
with:
|
|
261
|
+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
|
|
262
|
+
fetch-tags: true
|
|
263
|
+
- name: Setup Node.js
|
|
264
|
+
uses: actions/setup-node@v5
|
|
265
|
+
with:
|
|
266
|
+
node-version-file: '.nvmrc'
|
|
267
|
+
- name: Clean workspace
|
|
268
|
+
run: git reset --hard HEAD
|
|
269
|
+
- name: Clean npm cache
|
|
270
|
+
run: npm cache clean --force
|
|
271
|
+
- name: Setup JFrog
|
|
272
|
+
|
|
273
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
274
|
+
id: setup-jfrog
|
|
275
|
+
env:
|
|
276
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
277
|
+
with:
|
|
278
|
+
oidc-provider-name: ovp-github-oidc
|
|
279
|
+
- name: Install dependencies
|
|
280
|
+
|
|
281
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
282
|
+
env:
|
|
283
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
284
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
285
|
+
- name: Prepare Unisphere Applications
|
|
286
|
+
id: prepare-applications
|
|
287
|
+
run: npx unisphere application publish prepare --verbose
|
|
288
|
+
- name: Capture Commit SHA
|
|
289
|
+
id: capture_commit_sha
|
|
290
|
+
run: echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
|
291
|
+
- name: Set commit_sha as output
|
|
292
|
+
id: set_commit_sha
|
|
293
|
+
run: echo "commit_sha=${{ env.commit_sha }}" >> $GITHUB_OUTPUT
|
|
294
|
+
- uses: actions/upload-artifact@v6
|
|
295
|
+
id: upload-unisphere-applications-artifacts
|
|
296
|
+
with:
|
|
297
|
+
name: unisphere-applications
|
|
298
|
+
path: ${{ steps.prepare-applications.outputs.artifactsRootFolder }}
|
|
299
|
+
retention-days: 1
|
|
300
|
+
|
|
301
|
+
deploy-applications:
|
|
302
|
+
if: always() && needs.prepare-applications.outputs.hasArtifacts == 'true'
|
|
303
|
+
needs: [prepare-applications]
|
|
304
|
+
runs-on:
|
|
305
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.run_attempt }}
|
|
306
|
+
- instance-size:medium
|
|
307
|
+
strategy:
|
|
308
|
+
matrix:
|
|
309
|
+
envs_regions:
|
|
310
|
+
- { env: 'nvp1', region: 'us-east-1', accountid: '583352821080' }
|
|
311
|
+
- { env: 'frp2', region: 'eu-central-1', accountid: '082111255551' }
|
|
312
|
+
- { env: 'irp2', region: 'eu-west-1', accountid: '137576761235' }
|
|
313
|
+
- { env: 'nvq2', region: 'us-east-1', accountid: '383697330906' }
|
|
314
|
+
- { env: 'syp2', region: 'ap-southeast-2', accountid: '650755435642' }
|
|
315
|
+
- { env: 'cap2', region: 'ca-central-1', accountid: '948632009361' }
|
|
316
|
+
fail-fast: false
|
|
317
|
+
steps:
|
|
318
|
+
- name: Cache npm
|
|
319
|
+
uses: actions/cache@v5
|
|
320
|
+
with:
|
|
321
|
+
path: ~/.npm
|
|
322
|
+
key: dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('package-lock.json') }}
|
|
323
|
+
restore-keys: |
|
|
324
|
+
dependencies-${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-
|
|
325
|
+
|
|
326
|
+
- name: Checkout Repo at specific commit
|
|
327
|
+
uses: actions/checkout@v5
|
|
328
|
+
with:
|
|
329
|
+
ref: ${{ needs.prepare-applications.outputs.commit_sha }}
|
|
330
|
+
fetch-tags: true
|
|
331
|
+
- name: Setup Node.js
|
|
332
|
+
uses: actions/setup-node@v5
|
|
333
|
+
with:
|
|
334
|
+
node-version-file: '.nvmrc'
|
|
335
|
+
- name: Setup JFrog
|
|
336
|
+
|
|
337
|
+
uses: jfrog/setup-jfrog-cli@v5
|
|
338
|
+
id: setup-jfrog
|
|
339
|
+
env:
|
|
340
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
341
|
+
with:
|
|
342
|
+
oidc-provider-name: ovp-github-oidc
|
|
343
|
+
- name: Install dependencies
|
|
344
|
+
|
|
345
|
+
run: npm ci --prefer-offline --include=optional --no-fund --verbose
|
|
346
|
+
env:
|
|
347
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
348
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
349
|
+
- name: Download artifacts folder
|
|
350
|
+
uses: actions/download-artifact@v7
|
|
351
|
+
with:
|
|
352
|
+
name: unisphere-applications
|
|
353
|
+
path: ${{ needs.prepare-applications.outputs.unisphereApplicationsArtifactsFolder }}
|
|
354
|
+
- name: Sync S3 bucket
|
|
355
|
+
run: |
|
|
356
|
+
npx unisphere application publish execute \
|
|
357
|
+
--env ${{ matrix.envs_regions.env }} \
|
|
358
|
+
--aws-region '${{ matrix.envs_regions.region }}' \
|
|
359
|
+
--aws-arn 'arn:aws:iam::${{matrix.envs_regions.accountid }}:role/${{ matrix.envs_regions.env }}-unisphere-content-role' \
|
|
360
|
+
--artifacts-folder '${{ needs.prepare-applications.outputs.unisphereApplicationsArtifactsFolder }}' \
|
|
361
|
+
--verbose
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: Update _publish-artifacts.yml workflow
|
|
3
|
+
*
|
|
4
|
+
* Replaces .github/workflows/_publish-artifacts.yml with updated version.
|
|
5
|
+
*/
|
|
6
|
+
import { Tree } from '@nx/devkit';
|
|
7
|
+
export default function update(tree: Tree): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=update-publish-artifacts-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-publish-artifacts-workflow.d.ts","sourceRoot":"","sources":["../../../src/migrations/4-15-8/update-publish-artifacts-workflow.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAI1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC9D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Migration: Update _publish-artifacts.yml workflow
|
|
4
|
+
*
|
|
5
|
+
* Replaces .github/workflows/_publish-artifacts.yml with updated version.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.default = update;
|
|
9
|
+
const devkit_1 = require("@nx/devkit");
|
|
10
|
+
const fs_1 = require("fs");
|
|
11
|
+
const path_1 = require("path");
|
|
12
|
+
async function update(tree) {
|
|
13
|
+
devkit_1.logger.info('🔄 Updating GitHub _publish-artifacts workflow for v4.15.8');
|
|
14
|
+
// Ensure .github/workflows directory exists
|
|
15
|
+
if (!tree.exists('.github')) {
|
|
16
|
+
tree.write('.github/.gitkeep', '');
|
|
17
|
+
devkit_1.logger.info('✅ Created .github directory');
|
|
18
|
+
}
|
|
19
|
+
if (!tree.exists('.github/workflows')) {
|
|
20
|
+
tree.write('.github/workflows/.gitkeep', '');
|
|
21
|
+
devkit_1.logger.info('✅ Created .github/workflows directory');
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const workflowPath = '.github/workflows/_publish-artifacts.yml';
|
|
25
|
+
const templatePath = (0, path_1.join)(__dirname, 'templates', '_publish-artifacts.template');
|
|
26
|
+
const templateContent = (0, fs_1.readFileSync)(templatePath, 'utf-8');
|
|
27
|
+
const workflowExists = tree.exists(workflowPath);
|
|
28
|
+
tree.write(workflowPath, templateContent);
|
|
29
|
+
if (workflowExists) {
|
|
30
|
+
devkit_1.logger.info(`✅ Updated ${workflowPath}`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
devkit_1.logger.info(`✅ Created ${workflowPath}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
devkit_1.logger.error(`❌ Failed to update GitHub _publish-artifacts workflow: ${error?.message || 'Unknown error'}`);
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
package/migrations.json
CHANGED
|
@@ -618,6 +618,14 @@
|
|
|
618
618
|
"cli": {
|
|
619
619
|
"postUpdateMessage": "✅ Languages README files updated with 'npx unisphere language add' instructions"
|
|
620
620
|
}
|
|
621
|
+
},
|
|
622
|
+
"4.15.8-update-publish-artifacts-workflow": {
|
|
623
|
+
"version": "4.15.8",
|
|
624
|
+
"description": "Updates .github/workflows/_publish-artifacts.yml with latest template",
|
|
625
|
+
"factory": "./dist/migrations/4-15-8/update-publish-artifacts-workflow.js",
|
|
626
|
+
"cli": {
|
|
627
|
+
"postUpdateMessage": "✅ .github/workflows/_publish-artifacts.yml updated successfully"
|
|
628
|
+
}
|
|
621
629
|
}
|
|
622
630
|
},
|
|
623
631
|
"packageJsonUpdates": {
|
|
@@ -1164,6 +1172,17 @@
|
|
|
1164
1172
|
"alwaysAddToPackageJson": false
|
|
1165
1173
|
}
|
|
1166
1174
|
}
|
|
1175
|
+
},
|
|
1176
|
+
"4.15.7": {
|
|
1177
|
+
"version": "4.15.7",
|
|
1178
|
+
"cli": "nx",
|
|
1179
|
+
"postUpdateMessage": "🎉 Migration to @unisphere/nx 4.15.7 completed successfully!",
|
|
1180
|
+
"packages": {
|
|
1181
|
+
"@unisphere/cli": {
|
|
1182
|
+
"version": "6.1.2",
|
|
1183
|
+
"alwaysAddToPackageJson": false
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1167
1186
|
}
|
|
1168
1187
|
}
|
|
1169
1188
|
}
|