()
| 291 | const registryHost = selfHostedRegistryHost ?? "registry.trigger.dev"; |
| 292 | |
| 293 | const buildImage = async () => { |
| 294 | if (options.selfHosted) { |
| 295 | return buildAndPushSelfHostedImage({ |
| 296 | registryHost: selfHostedRegistryHost, |
| 297 | imageTag: deploymentResponse.data.imageTag, |
| 298 | cwd: compilation.path, |
| 299 | projectId: resolvedConfig.config.project, |
| 300 | deploymentId: deploymentResponse.data.id, |
| 301 | deploymentVersion: version, |
| 302 | contentHash: deploymentResponse.data.contentHash, |
| 303 | projectRef: resolvedConfig.config.project, |
| 304 | buildPlatform: options.buildPlatform, |
| 305 | pushImage: options.push, |
| 306 | selfHostedRegistry: !!options.registry, |
| 307 | noCache: options.noCache, |
| 308 | }); |
| 309 | } |
| 310 | |
| 311 | if (!deploymentResponse.data.externalBuildData) { |
| 312 | throw new Error( |
| 313 | "Failed to initialize deployment. The deployment does not have any external build data. To deploy this project, you must use the --self-hosted flag to build and push the image yourself." |
| 314 | ); |
| 315 | } |
| 316 | |
| 317 | return buildAndPushImage( |
| 318 | { |
| 319 | registryHost, |
| 320 | auth: authorization.auth.accessToken, |
| 321 | imageTag: deploymentResponse.data.imageTag, |
| 322 | buildId: deploymentResponse.data.externalBuildData.buildId, |
| 323 | buildToken: deploymentResponse.data.externalBuildData.buildToken, |
| 324 | buildProjectId: deploymentResponse.data.externalBuildData.projectId, |
| 325 | cwd: compilation.path, |
| 326 | projectId: resolvedConfig.config.project, |
| 327 | deploymentId: deploymentResponse.data.id, |
| 328 | deploymentVersion: deploymentResponse.data.version, |
| 329 | contentHash: deploymentResponse.data.contentHash, |
| 330 | projectRef: resolvedConfig.config.project, |
| 331 | loadImage: options.loadImage, |
| 332 | buildPlatform: options.buildPlatform, |
| 333 | noCache: options.noCache, |
| 334 | }, |
| 335 | deploymentSpinner |
| 336 | ); |
| 337 | }; |
| 338 | |
| 339 | const image = await buildImage(); |
| 340 |
no test coverage detected
searching dependent graphs…