@norskvideo/ctl-dev-kit 0.1.61 → 0.1.63
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/conventions/checks.yml +25 -0
- package/conventions/smoke.yml +9 -0
- package/package.json +9 -8
package/conventions/checks.yml
CHANGED
|
@@ -78,6 +78,31 @@ jobs:
|
|
|
78
78
|
bun run docs:check
|
|
79
79
|
'
|
|
80
80
|
|
|
81
|
+
# Does this repo's licence template still describe this repo? A template
|
|
82
|
+
# naming the wrong product, or an imageRef the build never produces, mints
|
|
83
|
+
# a licence that entitles nothing -- and the first sign of that is a
|
|
84
|
+
# 60-second readiness timeout at launch, indistinguishable from a product
|
|
85
|
+
# that failed to start. Cheap, no secrets, every PR.
|
|
86
|
+
#
|
|
87
|
+
# The image name is CI's own rule: PUBLISH_IMAGE when set, else the build
|
|
88
|
+
# script's IMAGE_TAG default, tag stripped -- a licence matches the repo
|
|
89
|
+
# part alone, never the tag.
|
|
90
|
+
- name: Check the licence template matches this repo
|
|
91
|
+
run: |
|
|
92
|
+
set -euo pipefail
|
|
93
|
+
product="$(sed -nE 's/.*PRODUCT_NAME[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' shared/src/version.ts | head -1)"
|
|
94
|
+
[ -n "$product" ] || { echo "::error::could not read PRODUCT_NAME from shared/src/version.ts"; exit 1; }
|
|
95
|
+
pub="$(sed -nE 's/^[[:space:]]*PUBLISH_IMAGE:[[:space:]]*"?([^" ]*)"?[[:space:]]*$/\1/p' .github/workflows/build-image.yml | head -1)"
|
|
96
|
+
def="$(sed -nE 's/.*IMAGE_TAG:-([^}]+)\}.*/\1/p' deployment/build-image.sh | head -1)"
|
|
97
|
+
ref="${pub:-$def}"
|
|
98
|
+
# A colon is a tag only after the last slash (a registry host may carry a port).
|
|
99
|
+
image="${ref%:*}"
|
|
100
|
+
case "${ref##*/}" in *:*) ;; *) image="$ref" ;; esac
|
|
101
|
+
[ -n "$image" ] || { echo "::error::could not determine the image this repo builds"; exit 1; }
|
|
102
|
+
nix develop .#build --command bun \
|
|
103
|
+
node_modules/@norskvideo/ctl-dev-kit/licence/check-template.ts \
|
|
104
|
+
licenseTemplate.json "$product" "$image"
|
|
105
|
+
|
|
81
106
|
# Report this pipeline's result to the aggregated product CI dashboard
|
|
82
107
|
# (id3as/ci-workflows) instead of posting its own pony — the dashboard renders
|
|
83
108
|
# the pony/emoji from the dispatched result. !cancelled() so a real pass/fail
|
package/conventions/smoke.yml
CHANGED
|
@@ -72,6 +72,13 @@ jobs:
|
|
|
72
72
|
# ports via the host-gateway alias and can join norsk-net for direct reach;
|
|
73
73
|
# a bare-metal host runner (the GPU box) must stay on localhost + publish.
|
|
74
74
|
# Detect rather than hardcode, so one byte-identical file serves both.
|
|
75
|
+
# NORSK_CTL_PRODUCT_REACH rides along because this step has already
|
|
76
|
+
# established the fact the daemon would otherwise sniff from its own
|
|
77
|
+
# cgroup: `product add --image` loopback-publishes the control plane and
|
|
78
|
+
# polls it for readiness, and on a DooD runner that loopback is the docker
|
|
79
|
+
# HOST's, so registration times out at 60s with nothing in the log saying
|
|
80
|
+
# why. The daemon's own detection stays the default; here the probe that
|
|
81
|
+
# already knows simply says so.
|
|
75
82
|
- name: Probe runner docker topology and set NORSK_TEST_HOST + NORSK_NET_REACH
|
|
76
83
|
run: |
|
|
77
84
|
set -uo pipefail
|
|
@@ -80,10 +87,12 @@ jobs:
|
|
|
80
87
|
echo "TOPO: hostname resolves to a container -> runner is containerized (DooD)"
|
|
81
88
|
echo "NORSK_TEST_HOST=host.docker.internal" >> "$GITHUB_ENV"
|
|
82
89
|
echo "NORSK_NET_REACH=direct" >> "$GITHUB_ENV"
|
|
90
|
+
echo "NORSK_CTL_PRODUCT_REACH=container-address" >> "$GITHUB_ENV"
|
|
83
91
|
else
|
|
84
92
|
echo "TOPO: hostname is not a container -> runner is host-based"
|
|
85
93
|
echo "NORSK_TEST_HOST=localhost" >> "$GITHUB_ENV"
|
|
86
94
|
echo "NORSK_NET_REACH=publish" >> "$GITHUB_ENV"
|
|
95
|
+
echo "NORSK_CTL_PRODUCT_REACH=host" >> "$GITHUB_ENV"
|
|
87
96
|
fi
|
|
88
97
|
|
|
89
98
|
- name: Write the Norsk license (from the org secret)
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norskvideo/ctl-dev-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
|
-
"./package.json": "./package.json",
|
|
7
|
-
"./testing/invariants": "./testing/invariants.ts",
|
|
8
|
-
"./testing/byte-snapshot": "./testing/byte-snapshot.ts",
|
|
9
6
|
"./create-product": "./create-product/create-product.ts",
|
|
10
|
-
"./docs/path-existence": "./docs/path-existence.ts",
|
|
11
|
-
"./docs/splice-generated": "./docs/splice-generated.ts",
|
|
12
7
|
"./doc-guide": "./doc-guide/doc-guide.js",
|
|
13
8
|
"./doc-guide/build-manual": "./doc-guide/build-manual.js",
|
|
14
9
|
"./doc-guide/bundle": "./doc-guide/bundle.js",
|
|
15
|
-
"./doc-guide/prose-bundle": "./doc-guide/prose-bundle.js",
|
|
16
10
|
"./doc-guide/guides-config": "./doc-guide/guides-config.js",
|
|
17
11
|
"./doc-guide/instance-proxy": "./doc-guide/instance-proxy.js",
|
|
18
|
-
"./doc-guide/live-browser": "./doc-guide/live-browser.js"
|
|
12
|
+
"./doc-guide/live-browser": "./doc-guide/live-browser.js",
|
|
13
|
+
"./doc-guide/prose-bundle": "./doc-guide/prose-bundle.js",
|
|
14
|
+
"./docs/path-existence": "./docs/path-existence.ts",
|
|
15
|
+
"./docs/splice-generated": "./docs/splice-generated.ts",
|
|
16
|
+
"./licence/check-template": "./licence/check-template.ts",
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
"./testing/byte-snapshot": "./testing/byte-snapshot.ts",
|
|
19
|
+
"./testing/invariants": "./testing/invariants.ts"
|
|
19
20
|
},
|
|
20
21
|
"bin": {
|
|
21
22
|
"ctl-dev-kit": "./create-product/cli.ts"
|