Skip to main content

Artifact Builds

Artifacts are the outputs of your build process -- Docker images and file bundles -- that deployment steps consume. DevRamps builds artifacts in isolated VMs from your source code, or imports them from external sources.

How Builds Work

When a deployment starts, DevRamps evaluates each artifact to determine if it needs rebuilding:

  1. Check rebuild_when_changed: If specified, DevRamps compares the listed paths against the files changed in the current push. If nothing changed, the artifact from the previous build is reused.
  2. Provision a build VM: If a rebuild is needed, DevRamps starts an isolated EC2 instance with the specified architecture and host_size.
  3. Clone your repository: The full repository is cloned into the VM.
  4. Run the build: For Docker artifacts, docker build runs. For bundles, your build_commands execute.
  5. Upload the artifact: Docker images are pushed to ECR. Bundles are uploaded to S3.

Docker Builds

Docker builds create container images from a Dockerfile.

artifacts:
API Image:
type: DEVRAMPS:DOCKER:BUILD
architecture: "linux/amd64"
rebuild_when_changed:
- /src
- /Dockerfile
params:
dockerfile: /Dockerfile
args:
- NODE_ENV=production

The image is pushed to a DevRamps-managed ECR repository. In subsequent stages, the image is automatically mirrored to each stage's target AWS account.

Bundle Builds

Bundle builds run arbitrary shell commands to produce a file artifact (typically a zip archive).

artifacts:
Lambda Package:
type: DEVRAMPS:BUNDLE:BUILD
architecture: "linux/arm64"
dependencies: ["node.24"]
rebuild_when_changed:
- /services/lambda
params:
build_commands: |
cd services/lambda
npm install --production
zip -r ../../lambda.zip .
file_path: /lambda.zip

The output file is uploaded to a DevRamps-managed S3 bucket and mirrored to target accounts for each stage.

Build VM Configuration

FieldDefaultOptionsDescription
host_size"small""small", "medium", "large"VM size for the build. Larger VMs have more CPU and memory.
architecture"linux/amd64""linux/amd64", "linux/arm64"CPU architecture. Match this to your deployment target.
dependencies[]e.g., ["node.24"]Additional software to install on the build VM.

Importing External Artifacts

If you build images or bundles in a separate CI/CD system, you can import them into DevRamps instead of building from source.

Docker Import

artifacts:
External Image:
type: DEVRAMPS:DOCKER:IMPORT
params:
source_image_url: 123456789.dkr.ecr.us-west-2.amazonaws.com/my-app:${{ trigger.sha }}
timeout_minutes: 15

DevRamps polls the source ECR repository until the image is available, then copies it to the DevRamps-managed ECR repository.

Bundle Import

artifacts:
External Bundle:
type: DEVRAMPS:BUNDLE:IMPORT
per_stage: true
params:
source_s3_url: s3://my-bucket/builds/${{ trigger.sha }}/bundle.zip
source_account: "123456789012"
source_region: "us-west-2"
timeout_minutes: 15

DevRamps polls the source S3 bucket until the object is available, then copies it to the DevRamps-managed S3 bucket.

Per-Stage Builds

By default, an artifact is built once and shared across all stages. Set per_stage: true when your build commands reference stage-specific variables:

artifacts:
Frontend:
type: DEVRAMPS:BUNDLE:BUILD
per_stage: true
params:
build_commands: |
API_URL=https://${{ vars.env }}.api.example.com npm run build
zip -r frontend.zip dist/
file_path: /frontend.zip

With per_stage: true, a separate build runs for each stage, each with its own variable values.

Rebuild Optimization

The rebuild_when_changed field lists paths that DevRamps monitors for changes. If none of the listed paths changed in the current push, the previous build artifact is reused.

artifacts:
API Image:
type: DEVRAMPS:DOCKER:BUILD
rebuild_when_changed:
- /src # Application source
- /Dockerfile # Docker configuration
- /package.json # Dependencies
params:
dockerfile: /Dockerfile

This avoids unnecessary rebuilds when you only changed documentation, Terraform, or other unrelated files.

If rebuild_when_changed is omitted, the artifact rebuilds on every push.

Build Details

Log retention

Build logs are stored in CloudWatch Logs and are accessible from the DevRamps dashboard. Logs are retained for 90 days.

Build VM networking

Build VMs run in a DevRamps-managed VPC and have outbound internet access for pulling dependencies (npm packages, Docker base images, etc.). They do not have access to private resources in your VPC. For steps that need private resource access (e.g., connecting to a database), use the run_in_vpc option on Script Execute steps.

Concurrent builds

Multiple artifacts within the same deployment build in parallel. There is no hard limit on concurrent builds per organization.