Skip to content

Commit e245b15

Browse files
author
Simon Rogers
committed
Merge branch 'release52' into feat/blueprint-config-validation
2 parents 3daed38 + 799ab71 commit e245b15

File tree

1,412 files changed

+38813
-17097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,412 files changed

+38813
-17097
lines changed

.github/PULL-REQUEST-TEMPLATE.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,27 @@ What is the new behavior?
3030
-->
3131

3232

33-
## Testing Instructions
33+
## Testing
3434
<!--
35-
Please provide some instructions and other information for how to verify that the feature works.
35+
When you add a feature, you should also provide relevant unit tests, in order to
36+
* ensure that the feature works as expected
37+
* ensure that the feature will continue to work in the future
38+
-->
39+
40+
- [ ] I have added one or more unit tests for this PR
41+
- [ ] I have updated the relevant unit tests
42+
- [ ] No unit test changes are needed for this PR
43+
44+
### Affected areas
45+
46+
<!--
47+
Please provide some details on what areas of the system that are affected by this PR.
48+
This is useful for testers to know where to focus their testing efforts.
3649
Examples:
37-
* "Do a Take for a part that contains an adlib, verify that the adlib plays out."
38-
* "Open the Switchboard panel and toggle a route, verify that the route toggles in the GUI."
39-
* "This feature also affects 'feature X', so that needs to be tested for regressions as well."
50+
* This PR affects the playout logic in general.
51+
* This PR affects the timing calculation in the Rundown during playout.
52+
* This PR affects the NRC/MOS integration
53+
*
4054
-->
4155

4256

.github/workflows/node.yaml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,18 @@ jobs:
184184
run: |
185185
cd meteor
186186
yarn inject-git-hash
187+
- name: Prepare webui for meteor build
188+
if: steps.check-build-and-push.outputs.enable == 'true'
189+
run: |
190+
rm -Rf meteor/public
191+
cp -R packages/webui/dist meteor/public
187192
- name: Meteor Build
188193
if: steps.check-build-and-push.outputs.enable == 'true'
189194
run: |
190195
cd meteor
191196
NODE_OPTIONS="--max-old-space-size=4096" METEOR_DEBUG_BUILD=1 meteor build --allow-superuser --directory .
197+
mv bundle/programs/web.browser/assets/ bundle/programs/web.browser/app/assets/ || true
198+
192199
- name: Meteor Bundle NPM Build
193200
if: steps.check-build-and-push.outputs.enable == 'true'
194201
run: |
@@ -212,7 +219,7 @@ jobs:
212219
password: ${{ secrets.GITHUB_TOKEN }}
213220
- name: Build and push to GHCR
214221
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
215-
uses: docker/build-push-action@v5
222+
uses: docker/build-push-action@v6
216223
with:
217224
context: .
218225
file: ./meteor/Dockerfile.circle
@@ -223,7 +230,7 @@ jobs:
223230
github-token: ${{ github.token }}
224231
- name: Build and push to DockerHub
225232
if: steps.check-build-and-push.outputs.enable == 'true' && steps.dockerhub.outputs.dockerhub-publish == '1'
226-
uses: docker/build-push-action@v5
233+
uses: docker/build-push-action@v6
227234
with:
228235
context: .
229236
file: ./meteor/Dockerfile.circle
@@ -239,7 +246,9 @@ jobs:
239246
echo "image=$image" >> $GITHUB_OUTPUT
240247
- name: Trivy scanning
241248
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
242-
uses: aquasecurity/[email protected]
249+
uses: aquasecurity/[email protected]
250+
env:
251+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
243252
with:
244253
image-ref: "${{ steps.trivy-image.outputs.image }}"
245254
format: "table"
@@ -362,7 +371,7 @@ jobs:
362371
password: ${{ secrets.GITHUB_TOKEN }}
363372
- name: Build and push to GHCR
364373
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
365-
uses: docker/build-push-action@v5
374+
uses: docker/build-push-action@v6
366375
with:
367376
context: ./packages
368377
file: ./packages/${{ matrix.gateway-name }}/Dockerfile.circle
@@ -372,7 +381,7 @@ jobs:
372381
tags: "${{ steps.ghcr-tag.outputs.tags }}"
373382
- name: Build and push to DockerHub
374383
if: steps.check-build-and-push.outputs.enable == 'true' && steps.dockerhub.outputs.dockerhub-publish == '1'
375-
uses: docker/build-push-action@v5
384+
uses: docker/build-push-action@v6
376385
with:
377386
context: ./packages
378387
file: ./packages/${{ matrix.gateway-name }}/Dockerfile.circle
@@ -388,7 +397,9 @@ jobs:
388397
echo "image=$image" >> $GITHUB_OUTPUT
389398
- name: Trivy scanning
390399
if: steps.check-build-and-push.outputs.enable == 'true' && steps.check-ghcr.outputs.enable == 'true' && steps.ghcr-tag.outputs.tags != 0
391-
uses: aquasecurity/[email protected]
400+
uses: aquasecurity/[email protected]
401+
env:
402+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
392403
with:
393404
image-ref: "${{ steps.trivy-image.outputs.image }}"
394405
format: "table"
@@ -422,9 +433,11 @@ jobs:
422433
- mos-gateway
423434
- corelib
424435
- shared-lib
436+
- meteor-lib
425437
- job-worker
426438
- openapi
427439
- live-status-gateway
440+
- webui
428441

429442
steps:
430443
- uses: actions/checkout@v4
@@ -467,7 +480,7 @@ jobs:
467480
- blueprints-integration
468481
- server-core-integration
469482
- shared-lib
470-
node-version: [14.x, 16.x, 18.x, 20.x]
483+
node-version: [14.x, 18.x, 20.x, 22.x]
471484
include:
472485
# include additional configs, to run certain packages only for a certain version of node
473486
- node-version: 14.x
@@ -477,19 +490,28 @@ jobs:
477490
package-name: job-worker
478491
send-coverage: true
479492
# manual openapi to avoid testing for 14.x
480-
- node-version: 16.x
481-
package-name: openapi
482493
- node-version: 18.x
483494
package-name: openapi
484495
- node-version: 20.x
485496
package-name: openapi
497+
- node-version: 22.x
498+
package-name: openapi
486499
# No tests for the gateways yet
487500
# - node-version: 18.x
488501
# package-name: playout-gateway
489502
# - node-version: 18.x
490503
# package-name: mos-gateway
491504
- node-version: 18.x
492505
package-name: live-status-gateway
506+
send-coverage: true
507+
- node-version: 18.x
508+
package-name: webui
509+
# manual meteor-lib as it only needs a couple of versions
510+
- node-version: 18.x
511+
package-name: meteor-lib
512+
send-coverage: true
513+
- node-version: 14.x
514+
package-name: meteor-lib
493515

494516
steps:
495517
- uses: actions/checkout@v4
@@ -520,7 +542,7 @@ jobs:
520542
env:
521543
CI: true
522544
- name: Send coverage
523-
if: (matrix.node-version == '16.x' || matrix.send-coverage == true) && ((github.event_name == 'pull_request') && ((!startsWith(github.head_ref, 'release'))) || ((github.event_name == 'push') && (!startsWith(github.ref_name, 'release'))))
545+
if: (matrix.node-version == '18.x' || matrix.send-coverage == true) && ((github.event_name == 'pull_request') && ((!startsWith(github.head_ref, 'release'))) || ((github.event_name == 'push') && (!startsWith(github.ref_name, 'release'))))
524546
uses: codecov/codecov-action@v4
525547
env:
526548
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -569,13 +591,17 @@ jobs:
569591
yarn
570592
env:
571593
CI: true
572-
- name: Run generator
594+
- name: Build OpenAPI client library
595+
run: |
596+
cd packages/openapi
597+
yarn build
598+
env:
599+
CI: true
600+
- name: Generate OpenAPI docs and server
573601
run: |
574602
cd packages/openapi
575-
576603
yarn gendocs
577604
yarn genserver
578-
yarn genclient:ts
579605
env:
580606
CI: true
581607

@@ -622,7 +648,7 @@ jobs:
622648
CI: true
623649
- name: Publish
624650
if: github.ref == 'refs/heads/master' # always publish for just the master branch
625-
uses: peaceiris/actions-gh-pages@v3
651+
uses: peaceiris/actions-gh-pages@v4
626652
with:
627653
github_token: ${{ secrets.GITHUB_TOKEN }}
628654
publish_dir: ./packages/documentation/build
@@ -664,7 +690,7 @@ jobs:
664690
else
665691
# make dependencies of `determine-npm-tag` available
666692
yarn install --mode=skip-build
667-
693+
668694
cd packages
669695
PACKAGE_NAME="@sofie-automation/shared-lib"
670696
PUBLISHED_VERSION=$(yarn npm info --json $PACKAGE_NAME | jq -c '.version' -r)
@@ -682,6 +708,13 @@ jobs:
682708
yarn build
683709
env:
684710
CI: true
711+
- name: Build OpenAPI client library
712+
if: ${{ steps.do-publish.outputs.tag }}
713+
run: |
714+
cd packages/openapi
715+
yarn build
716+
env:
717+
CI: true
685718
- name: Modify dependencies to use npm packages
686719
run: node scripts/prepublish.js
687720
- name: Publish to NPM

.github/workflows/prerelease-libs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- blueprints-integration
5454
- server-core-integration
5555
- shared-lib
56-
node-version: [14.x, 16.x, 18.x, 20.x]
56+
node-version: [14.x, 18.x, 20.x, 22.x]
5757

5858
steps:
5959
- uses: actions/checkout@v4
@@ -131,6 +131,14 @@ jobs:
131131
yarn build
132132
env:
133133
CI: true
134+
135+
- name: Build OpenAPI client library
136+
if: ${{ steps.do-publish.outputs.publish }}
137+
run: |
138+
cd packages/openapi
139+
yarn build
140+
env:
141+
CI: true
134142
- name: Modify dependencies to use npm packages
135143
run: node scripts/prepublish.js
136144
- name: Publish to NPM

.github/workflows/prune-container-images.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
jobs:
99
prune-container-images:
10+
if: ${{ github.repository_owner == 'nrkno' }}
11+
1012
uses: nrkno/sofie-github-workflows/.github/workflows/prune-container-images.yml@main
1113
strategy:
1214
max-parallel: 1

.github/workflows/prune-tags.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616

1717
jobs:
1818
prune-tags:
19+
if: ${{ github.repository_owner == 'nrkno' }}
20+
1921
name: Prune tags
2022
runs-on: ubuntu-latest
2123
timeout-minutes: 15

.github/workflows/sonar.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
sonarcloud:
1313
name: SonarCloud
1414
runs-on: ubuntu-latest
15-
if: ${{ github.repository_owner == 'nrkno' }}
15+
if: ${{ github.repository_owner == 'nrkno' && !github.event.pull_request.head.repo.fork }}
16+
timeout-minutes: 15
1617

1718
steps:
1819
- uses: actions/checkout@v4

.github/workflows/trivy.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,29 @@ on:
66

77
jobs:
88
trivy:
9+
if: ${{ github.repository_owner == 'nrkno' }}
10+
911
name: Trivy scan
1012
runs-on: ubuntu-latest
1113
strategy:
1214
matrix:
1315
image: ["server-core", "playout-gateway", "mos-gateway"]
16+
timeout-minutes: 15
17+
1418
steps:
1519
- name: Run Trivy vulnerability scanner (json)
16-
uses: aquasecurity/[email protected]
20+
uses: aquasecurity/[email protected]
21+
env:
22+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
1723
with:
1824
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
1925
format: json
2026
output: '${{ matrix.image }}-trivy-scan-results.json'
2127

2228
- name: Run Trivy vulnerability scanner (table)
23-
uses: aquasecurity/[email protected]
29+
uses: aquasecurity/[email protected]
30+
env:
31+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
2432
with:
2533
image-ref: ghcr.io/nrkno/sofie-core-${{ matrix.image }}:latest
2634
output: '${{ matrix.image }}-trivy-scan-results.txt'
@@ -36,7 +44,9 @@ jobs:
3644
echo $CODE_BLOCK >> $GITHUB_STEP_SUMMARY
3745
3846
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
39-
uses: aquasecurity/[email protected]
47+
uses: aquasecurity/[email protected]
48+
env:
49+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
4050
with:
4151
format: 'github'
4252
output: 'dependency-results-${{ matrix.image }}.sbom.json'
@@ -54,7 +64,7 @@ jobs:
5464
echo ${{ env.SUMMARY }}
5565
5666
- name: Send Slack Notification
57-
uses: slackapi/slack-github-action@v1.25.0
67+
uses: slackapi/slack-github-action@v1.27.0
5868
with:
5969
payload: |
6070
{

.vscode/settings.json.default

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"packages/shared-lib",
1010
"packages/job-worker",
1111
"packages/openapi",
12-
"packages/live-status-gateway"
12+
"packages/live-status-gateway",
13+
"packages/webui"
1314
],
1415
"prettier.enable": true,
1516
"sonarlint.connectedMode.project": { "projectKey": "nrkno_sofie-core" },

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ This repository uses the following branches:
99
* **_master_** is our main branch. We consider it stable and it is used in production.
1010
* The **_releaseXX_** branches are our in-development branches. When a release is ready, we decide to “freeze” that branch and create a new **_releaseXX+1_** branch.
1111

12-
We encourage you to base your contributions on the latest **_releaseXX_** branch, alternatively the **_master_** branch or a recently frozen **_releaseXX_** branch. The [_Sofie Releases_](https://nrkno.github.io/sofie-core/releases) page collects the status and timeline of the releases.
12+
We require contributions to be based based on the latest **_release\*_** branch.
13+
The [_Sofie Releases_](https://nrkno.github.io/sofie-core/releases) page collects the status and timeline of the releases.

DEVELOPER.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ Follow these instructions to start up Sofie Core in development mode. (For produ
1818

1919
### Prerequisites
2020

21-
- Install [Node.js](https://nodejs.org) 18 (14 should also work) (using [nvm](https://github.com/nvm-sh/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) is the recommended way to install Node.js)
22-
- If on Windows: `npm install --global windows-build-tools`
23-
- Install [Meteor](https://www.meteor.com/install) (`npm install --global meteor`)
21+
- Install [Node.js](https://nodejs.org) 14 (using [nvm](https://github.com/nvm-sh/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) is the recommended way to install Node.js)
22+
- Install [Meteor](https://www.meteor.com/install) (`npm install --global meteor@2`)
23+
- Install [Node.js](https://nodejs.org) 18 (using the same method you used above, you can uninstall node 14 if needed)
24+
- Install an older version of corepack (`npm install --global [email protected]`)
2425
- Enable [corepack](https://nodejs.org/api/corepack.html#corepack) (`corepack enable`) as administrator/root. If `corepack` is not found, you may need to install it first with `npm install --global corepack`
2526

27+
- If on Windows, you may need to `npm install --global windows-build-tools` but this is not always necessary
28+
2629
### Quick Start
2730

2831
```bash
@@ -33,6 +36,8 @@ yarn start
3336

3437
> 💡 First startup may take a while, especially on Windows. To speed things up, consider adding `%LOCALAPPDATA%\.meteor` and the directory where you cloned `server-core` to your Windows Defender virus protection exclusions.
3538
39+
The Sofie ui (served by Vite) can be accessed at `http://localhost:3005`. The meteor http server can be access directly at `http://localhost:3000`
40+
3641
### Slightly more Involved Start
3742

3843
1. Clone the repository (for development, it is recommended to base your work on the latest unstable release branch)

0 commit comments

Comments
 (0)