Skip to content

Commit afc9a6a

Browse files
authored
Add ECR support for remote builds (#2224)
* create repo if doesn't exist * fresh auth token for each deploy * optional assume role * log when machine overrides enabled * make test repo namespace configurable * assume role fix and env var changes * improve ecr check * improve tag parsing * tag parsing tests * track if repo created and fix test * missing tryCatch for sts call
1 parent 7bb7e7a commit afc9a6a

File tree

8 files changed

+1868
-16
lines changed

8 files changed

+1868
-16
lines changed

apps/webapp/app/env.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,21 @@ const EnvironmentSchema = z.object({
229229
DEPOT_TOKEN: z.string().optional(),
230230
DEPOT_ORG_ID: z.string().optional(),
231231
DEPOT_REGION: z.string().default("us-east-1"),
232+
233+
// Deployment registry
232234
DEPLOY_REGISTRY_HOST: z.string().min(1),
233235
DEPLOY_REGISTRY_USERNAME: z.string().optional(),
234236
DEPLOY_REGISTRY_PASSWORD: z.string().optional(),
235237
DEPLOY_REGISTRY_NAMESPACE: z.string().min(1).default("trigger"),
238+
DEPLOY_REGISTRY_ECR_TAGS: z.string().optional(), // csv, for example: "key1=value1,key2=value2"
239+
DEPLOY_REGISTRY_ECR_ASSUME_ROLE_ARN: z.string().optional(),
240+
DEPLOY_REGISTRY_ECR_ASSUME_ROLE_EXTERNAL_ID: z.string().optional(),
236241
DEPLOY_IMAGE_PLATFORM: z.string().default("linux/amd64"),
237242
DEPLOY_TIMEOUT_MS: z.coerce
238243
.number()
239244
.int()
240245
.default(60 * 1000 * 8), // 8 minutes
246+
241247
OBJECT_STORE_BASE_URL: z.string().optional(),
242248
OBJECT_STORE_ACCESS_KEY_ID: z.string().optional(),
243249
OBJECT_STORE_SECRET_ACCESS_KEY: z.string().optional(),

apps/webapp/app/services/platform.v3.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ function initializeMachinePresets(): {
102102
};
103103
}
104104

105+
logger.info("🎛️ Overriding machine presets", { overrides });
106+
105107
return {
106108
defaultMachine: overrideDefaultMachine(defaultMachineFromPlatform, overrides.defaultMachine),
107109
machines: overrideMachines(machinesFromPlatform, overrides.machines),

0 commit comments

Comments
 (0)