fix: support containerized release runtimes

This commit is contained in:
2026-08-04 14:45:47 +00:00
parent a044d97d77
commit 6e635a312f
17 changed files with 101 additions and 45 deletions
@@ -61,7 +61,7 @@ export const buildGatewayProcessDefinitions = (
const apiCwd = path.join(workspaceRoot, 'app', 'gateway-api');
const frontendCwd = path.join(workspaceRoot, 'app', 'gateway-frontend');
const apiScript = path.join(apiCwd, 'dist', 'index.js');
const frontendScript = path.join(workspaceRoot, 'node_modules', 'vite', 'bin', 'vite.js');
const frontendScript = path.join(frontendCwd, 'node_modules', 'vite', 'bin', 'vite.js');
const env = {
...config.baseEnv,
GATEWAY_API_HOST: '0.0.0.0',
@@ -14,7 +14,7 @@ import type {
import { afterEach, describe, expect, it } from 'vitest';
import { resolveReleaseControllerConfig, type ReleaseControllerConfig } from '../src/config.js';
import { GatewayReleaseController } from '../src/releaseController.js';
import { buildGatewayProcessDefinitions, GatewayReleaseController } from '../src/releaseController.js';
import { upgradeReleaseController } from '../src/selfUpgrade.js';
const SHA = '1111111111111111111111111111111111111111';
@@ -116,6 +116,14 @@ const createRepository = () => {
const gatewayNames = ['sammo:gateway-api', 'sammo:gateway-frontend', 'sammo:gateway-orchestrator'];
it('runs Gateway preview from the frontend workspace dependency', () => {
const definitions = buildGatewayProcessDefinitions('/srv/sammo/release', config);
const frontend = definitions.find((definition) => definition.name === 'sammo:gateway-frontend');
expect(frontend?.script).toBe(
'/srv/sammo/release/app/gateway-frontend/node_modules/vite/bin/vite.js'
);
});
describe('GatewayReleaseController', () => {
it('builds, migrates, switches all gateway roles, verifies readiness, and publishes atomically', async () => {
const workspace = await createReleaseWorkspace();