Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
40 lines
2.2 KiB
JavaScript
40 lines
2.2 KiB
JavaScript
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
|
|
const repoRoot = path.resolve(path.join(import.meta.dirname, '..', '..', '..', '..'));
|
|
const controlPlaneDir = path.join(repoRoot, 'ee', 'appliance', 'control-plane');
|
|
|
|
test('control-plane image packages existing setup/status UI and API contracts', () => {
|
|
const dockerfile = fs.readFileSync(path.join(controlPlaneDir, 'Dockerfile'), 'utf8');
|
|
const readme = fs.readFileSync(path.join(controlPlaneDir, 'README.md'), 'utf8');
|
|
|
|
assert.match(dockerfile, /FROM node:22-alpine AS ui-build/);
|
|
assert.match(dockerfile, /WORKDIR \/workspace\/ee\/appliance\/status-ui/);
|
|
assert.match(dockerfile, /RUN npm ci/);
|
|
assert.match(dockerfile, /RUN npm run build/);
|
|
assert.match(dockerfile, /FROM node:22-alpine AS runtime/);
|
|
assert.match(dockerfile, /apk add --no-cache bash curl kubectl/);
|
|
assert.match(dockerfile, /https:\/\/fluxcd\.io\/install\.sh/);
|
|
assert.match(dockerfile, /ENV ALGA_APPLIANCE_STATUS_UI_DIR=\/opt\/alga-appliance\/status-ui\/dist/);
|
|
assert.match(dockerfile, /ENV ALGA_APPLIANCE_MODE=kubernetes-control-plane/);
|
|
assert.match(dockerfile, /ENV ALGA_APPLIANCE_BUNDLE_ORIGIN=baked-iso/);
|
|
assert.match(dockerfile, /COPY ee\/appliance\/host-service\/\*\.mjs \.\/host-service\//);
|
|
assert.match(dockerfile, /COPY ee\/appliance\/scripts \.\/scripts/);
|
|
assert.match(dockerfile, /COPY ee\/appliance\/manifests \.\/manifests/);
|
|
assert.match(dockerfile, /COPY ee\/appliance\/flux \.\/flux/);
|
|
// Release metadata is intentionally NOT baked into the control-plane image;
|
|
// it is resolved from the OCI registry by channel at setup time.
|
|
assert.doesNotMatch(dockerfile, /COPY ee\/appliance\/releases/);
|
|
assert.match(dockerfile, /COPY --from=ui-build .*status-ui\/dist \.\/status-ui\/dist/);
|
|
assert.match(dockerfile, /control-plane-entrypoint\.sh/);
|
|
assert.match(dockerfile, /USER 10001:10001/);
|
|
assert.match(dockerfile, /EXPOSE 8080/);
|
|
assert.match(dockerfile, /CMD \["\/opt\/alga-appliance\/scripts\/control-plane-entrypoint\.sh"\]/);
|
|
|
|
assert.match(readme, /docker build -f ee\/appliance\/control-plane\/Dockerfile/);
|
|
assert.match(readme, /existing static status UI/);
|
|
assert.match(readme, /existing setup\/status API/);
|
|
});
|