Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Added no build source deploys for NodeJS applications#193

Merged
shruti-mantri merged 11 commits into
GoogleCloudPlatform:mainfrom
husainhirani:no-build-source-deploy-nodejs
Jan 13, 2026
Merged

feat: Added no build source deploys for NodeJS applications#193
shruti-mantri merged 11 commits into
GoogleCloudPlatform:mainfrom
husainhirani:no-build-source-deploy-nodejs

Conversation

@husainhirani
Copy link
Copy Markdown
Member

@husainhirani husainhirani commented Dec 29, 2025

Implements Feature #192

This PR introduces logic to deploy source artifacts directly to Cloud Run, bypassing the Cloud Build step.

How it works
Instead of building a container image from source, we upload a pre-packaged archive of the application directly to a Cloud Storage bucket. Cloud Run then mounts this archive and executes it on top of a specified base image. This approach results in dramatically faster deployment times.

Limitations & Conditions

The direct source deployment (skipping Cloud Build) automatically triggers only under these specific conditions:

  1. Node.js Only: Currently restricted to Node.js applications.
  2. No Dockerfile: The project must not have a Dockerfile. If a Dockerfile is present, we assume custom build logic is required and fall back to Cloud Build.
  3. Start Script Required: The package.json must contain a valid start script (deploying will fail or fall back if missing).
  4. Standard Base Image: Uses nodejs22 as the default base image for the runtime.
  5. No Custom Runtime Support: The Node JS app should not have custom engine specified.

Other limitations of source deployed applications without build are described here.

Deployment Performance Comparison

Tested with a simple hello-world app

Metric Total Time Deployment Only*
With Cloud Build 130s 122s
Direct Deployment (No Build) 24.24s 14.37s
Speedup ~5.4x Faster ~8.5x Faster
*Excluding pre-checks and API enabling.

Timelines

With Cloud Build (130s)
With Cloud Build Timeline
Direct Source Deployment (24.24s)
Direct Deployment Timeline

Manual Testing:
Performed manual testing of application deployments with multiple dependencies, ensuring clean and efficient installation and the deployments were successful.

Comment thread lib/deployment/helpers.js
Comment thread lib/deployment/source-processor.js
Comment thread lib/deployment/source-processor.js Outdated
Comment thread lib/deployment/source-processor.js
Comment thread lib/deployment/source-processor.js
Comment thread lib/deployment/source-processor.js Outdated
Comment thread lib/deployment/deployer.js
Comment thread lib/deployment/helpers.js
Comment thread lib/deployment/deployer.js Outdated
Comment thread lib/deployment/deployer.js Outdated
Comment thread lib/deployment/helpers.js Outdated
Comment thread lib/deployment/source-processor.js Outdated
Comment thread lib/deployment/source-processor.js Outdated
@husainhirani husainhirani force-pushed the no-build-source-deploy-nodejs branch 5 times, most recently from 6d28345 to 2121ae9 Compare January 12, 2026 11:39
@husainhirani husainhirani force-pushed the no-build-source-deploy-nodejs branch 4 times, most recently from b057029 to ce5702b Compare January 12, 2026 15:00
@husainhirani husainhirani force-pushed the no-build-source-deploy-nodejs branch from ce5702b to f014b0d Compare January 12, 2026 15:15
@husainhirani husainhirani added the kokoro:force-run This will force trigger a run for presubmit tests label Jan 12, 2026
@husainhirani husainhirani added kokoro:force-run This will force trigger a run for presubmit tests and removed kokoro:force-run This will force trigger a run for presubmit tests labels Jan 12, 2026
@kokoro-team kokoro-team removed the kokoro:force-run This will force trigger a run for presubmit tests label Jan 12, 2026
@husainhirani husainhirani added the kokoro:force-run This will force trigger a run for presubmit tests label Jan 12, 2026
@kokoro-team kokoro-team removed the kokoro:force-run This will force trigger a run for presubmit tests label Jan 12, 2026
@shruti-mantri shruti-mantri merged commit d74c410 into GoogleCloudPlatform:main Jan 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants