Skip to content

feat(builds): add build_args support to CreateBuild API#84

Open
hiroTamada wants to merge 1 commit intomainfrom
feat/build-args
Open

feat(builds): add build_args support to CreateBuild API#84
hiroTamada wants to merge 1 commit intomainfrom
feat/build-args

Conversation

@hiroTamada
Copy link
Contributor

@hiroTamada hiroTamada commented Feb 6, 2026

Summary

  • Expose the existing BuildArgs field through the CreateBuild API
  • Accept build_args as a JSON object in the multipart form (e.g., {"NODE_ENV": "production"})
  • Args are passed to buildctl as --opt build-arg:KEY=VALUE

Test plan

  • Tested with a Dockerfile containing ARG instructions
  • Verified build args appear in buildctl command line
  • Verified build completes successfully with args applied
  • Verified invalid JSON returns proper error message

Note

Low Risk
Small, additive change to request parsing and API schema; main risk is backward-compatible but could reject previously-accepted malformed build_args inputs or surface parsing errors.

Overview
The CreateBuild API now accepts an optional build_args multipart field containing a JSON object of key/value pairs, validates it, and forwards the parsed map into the builds.CreateBuildRequest sent to BuildManager.

The OpenAPI spec and generated oapi types are updated to document build_args (as a JSON-encoded string in the multipart body), and the embedded swagger blob is regenerated accordingly.

Written by Cursor Bugbot for commit d31f7e6. This will update automatically on new commits. Configure here.

Expose the existing BuildArgs field through the API, allowing users to
pass Dockerfile ARG values when creating builds. The build_args field
accepts a JSON object of key-value pairs that are passed to buildctl
as --opt build-arg:KEY=VALUE.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

✱ Stainless preview builds

This PR will update the hypeman SDKs with the following commit message.

feat(builds): add build_args support to CreateBuild API

Edit this comment to update it. It will appear in the SDK's changelogs.

hypeman-typescript studio · code · diff

Your SDK built successfully.
generate ⚠️build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/hypeman-typescript/c41baa9d59b13ce1894f333ec60589383dcac35a/dist.tar.gz
hypeman-go studio · code · diff

Your SDK built successfully.
generate ⚠️lint ✅test ✅

go get github.com/stainless-sdks/hypeman-go@fd0dc364908b2063d095cac6f1799e02e38a4de0
hypeman-cli studio · conflict

⏳ These are partial results; builds are still running.


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-02-06 17:01:42 UTC

@hiroTamada hiroTamada requested review from rgarcia and sjmiller609 and removed request for rgarcia February 6, 2026 17:01
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.

1 participant