Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
chore(ts/e2e): update docker-build.ts
jkomyno committed
Jan 27, 2026 at 03:58 UTC
970aec25ac9570c7bff366307fea4aa36be860a9
1 file changed
+25
-13
ts/e2e-tests/_utils/scripts/docker-build.ts
+25
-13
@@ -1,7 +1,12 @@
1
#!/usr/bin/env bun
2
/**
3
- * Builds Docker images for all well-known Node.js versions used by e2e tests.
4
- * This includes versions from WELL_KNOWN_NODE_VERSIONS and the current runtime version.
3
+ * Builds Docker images for Node.js e2e tests.
4
+ *
5
+ * In CI mode (COMPOSIO_E2E_NODE_VERSION set):
6
+ * Only builds the image for the specified version.
7
+ *
8
+ * In local mode:
9
+ * Builds images for all versions in WELL_KNOWN_NODE_VERSIONS.
10
*/
11
12
import { $ } from 'bun';
@@ -55,24 +60,31 @@ async function buildImage(nodeVersion: string, repoRoot: string): Promise<boolea
60
async function main() {
61
const repoRoot = getRepoRoot();
62
const currentNodeVersion = process.versions.node;
63
+ const envVersion = Bun.env.COMPOSIO_E2E_NODE_VERSION;
64
59
- // Collect all unique Node versions to build
65
+ // In CI mode with COMPOSIO_E2E_NODE_VERSION set, only build that specific version
66
+ // Otherwise, build all well-known versions (for local development)
67
const versions = new Set<string>();
68
62
- for (const version of WELL_KNOWN_NODE_VERSIONS) {
63
- if (version === 'current') {
64
- versions.add(currentNodeVersion);
65
- } else {
66
- versions.add(version);
69
+ if (envVersion) {
70
+ versions.add(envVersion);
71
+ console.log(`Building Docker image for CI matrix version: ${envVersion}`);
72
+ } else {
73
+ for (const version of WELL_KNOWN_NODE_VERSIONS) {
74
+ if (version === 'current') {
75
+ versions.add(currentNodeVersion);
76
+ } else {
77
+ versions.add(version);
78
+ }
79
+ }
80
+ console.log('Building Docker images for Node.js versions:');
81
+ for (const v of versions) {
82
+ const isCurrent = v === currentNodeVersion ? ' (current)' : '';
83
+ console.log(` - ${v}${isCurrent}`);
84
}
85
}
86
87
const versionList = Array.from(versions);
71
- console.log('Building Docker images for Node.js versions:');
72
- for (const v of versionList) {
73
- const isCurrent = v === currentNodeVersion ? ' (current)' : '';
74
- console.log(` - ${v}${isCurrent}`);
75
- }
88
89
let failed = 0;
90
for (const version of versionList) {