Skip to content

Commit fbe8fea

Browse files
feat: Add image_name parameter to builds
1 parent 0adb0e3 commit fbe8fea

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 37
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-fa1e2bdf81a0cf5ecd0c01200b07d0bc08861f834b539c751aa0fec0496fdf2c.yml
3-
openapi_spec_hash: c70af233ec40cdc23b9a2886b508905e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-88202634e62d08a99d4a0975b8ce26158ec1694ee2639167ad40c06780b6c270.yml
3+
openapi_spec_hash: 93b690dd5d65ac2eaea08c81339414fe
44
config_hash: d452c139da1e46a44a68b91e8a40de72

build.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ type BuildNewParams struct {
252252
// specified, the build will import from cache/global/{key}. Admin builds will also
253253
// export to this location.
254254
GlobalCacheKey param.Opt[string] `json:"global_cache_key,omitzero"`
255+
// Custom image name for the build output. When set, the image is pushed to
256+
// {registry}/{image_name} instead of {registry}/builds/{id}.
257+
ImageName param.Opt[string] `json:"image_name,omitzero"`
255258
// Set to "true" to grant push access to global cache (operator-only). Admin builds
256259
// can populate the shared global cache that all tenant builds read from.
257260
IsAdminBuild param.Opt[string] `json:"is_admin_build,omitzero"`

build_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func TestBuildNewWithOptionalParams(t *testing.T) {
3434
CacheScope: hypeman.String("cache_scope"),
3535
Dockerfile: hypeman.String("dockerfile"),
3636
GlobalCacheKey: hypeman.String("global_cache_key"),
37+
ImageName: hypeman.String("image_name"),
3738
IsAdminBuild: hypeman.String("is_admin_build"),
3839
Secrets: hypeman.String("secrets"),
3940
TimeoutSeconds: hypeman.Int(0),

0 commit comments

Comments
 (0)