Skip to content

Commit 43956c1

Browse files
committed
api: swagger: document BuildCache fields (API v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 5371c88 commit 43956c1

3 files changed

Lines changed: 159 additions & 0 deletions

File tree

docs/api/v1.39.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,23 +2132,52 @@ definitions:
21322132

21332133
BuildCache:
21342134
type: "object"
2135+
description: |
2136+
BuildCache contains information about a build cache record.
21352137
properties:
21362138
ID:
21372139
type: "string"
2140+
description: |
2141+
Unique ID of the build cache record.
2142+
example: "ndlpt0hhvkqcdfkputsk4cq9c"
21382143
Parent:
2144+
description: |
2145+
ID of the parent build cache record.
21392146
type: "string"
2147+
example: "hw53o5aio51xtltp5xjp8v7fx"
21402148
Type:
21412149
type: "string"
2150+
description: |
2151+
Cache record type.
2152+
example: "regular"
2153+
# see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84
2154+
enum:
2155+
- "internal"
2156+
- "frontend"
2157+
- "source.local"
2158+
- "source.git.checkout"
2159+
- "exec.cachemount"
2160+
- "regular"
21422161
Description:
21432162
type: "string"
2163+
description: |
2164+
Description of the build-step that produced the build cache.
2165+
example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
21442166
InUse:
21452167
type: "boolean"
2168+
description: |
2169+
Indicates if the build cache is in use.
2170+
example: false
21462171
Shared:
21472172
type: "boolean"
2173+
description: |
2174+
Indicates if the build cache is shared.
2175+
example: true
21482176
Size:
21492177
description: |
21502178
Amount of disk space used by the build cache (in bytes).
21512179
type: "integer"
2180+
example: 51
21522181
CreatedAt:
21532182
description: |
21542183
Date and time at which the build cache was created in
@@ -2166,6 +2195,7 @@ definitions:
21662195
example: "2017-08-09T07:09:37.632105588Z"
21672196
UsageCount:
21682197
type: "integer"
2198+
example: 26
21692199

21702200
ImageID:
21712201
type: "object"
@@ -8195,6 +8225,29 @@ paths:
81958225
UsageData:
81968226
Size: 10920104
81978227
RefCount: 2
8228+
BuildCache:
8229+
-
8230+
ID: "hw53o5aio51xtltp5xjp8v7fx"
8231+
Parent: """
8232+
Type: "regular"
8233+
Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
8234+
InUse: false
8235+
Shared: true
8236+
Size: 0
8237+
CreatedAt: "2021-06-28T13:31:01.474619385Z"
8238+
LastUsedAt: "2021-07-07T22:02:32.738075951Z"
8239+
UsageCount: 26
8240+
-
8241+
ID: "ndlpt0hhvkqcdfkputsk4cq9c"
8242+
Parent: "ndlpt0hhvkqcdfkputsk4cq9c"
8243+
Type: "regular"
8244+
Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
8245+
InUse: false
8246+
Shared: true
8247+
Size: 51
8248+
CreatedAt: "2021-06-28T13:31:03.002625487Z"
8249+
LastUsedAt: "2021-07-07T22:02:32.773909517Z"
8250+
UsageCount: 26
81988251
500:
81998252
description: "server error"
82008253
schema:

docs/api/v1.40.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,23 +2193,52 @@ definitions:
21932193

21942194
BuildCache:
21952195
type: "object"
2196+
description: |
2197+
BuildCache contains information about a build cache record.
21962198
properties:
21972199
ID:
21982200
type: "string"
2201+
description: |
2202+
Unique ID of the build cache record.
2203+
example: "ndlpt0hhvkqcdfkputsk4cq9c"
21992204
Parent:
2205+
description: |
2206+
ID of the parent build cache record.
22002207
type: "string"
2208+
example: "hw53o5aio51xtltp5xjp8v7fx"
22012209
Type:
22022210
type: "string"
2211+
description: |
2212+
Cache record type.
2213+
example: "regular"
2214+
# see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84
2215+
enum:
2216+
- "internal"
2217+
- "frontend"
2218+
- "source.local"
2219+
- "source.git.checkout"
2220+
- "exec.cachemount"
2221+
- "regular"
22032222
Description:
22042223
type: "string"
2224+
description: |
2225+
Description of the build-step that produced the build cache.
2226+
example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
22052227
InUse:
22062228
type: "boolean"
2229+
description: |
2230+
Indicates if the build cache is in use.
2231+
example: false
22072232
Shared:
22082233
type: "boolean"
2234+
description: |
2235+
Indicates if the build cache is shared.
2236+
example: true
22092237
Size:
22102238
description: |
22112239
Amount of disk space used by the build cache (in bytes).
22122240
type: "integer"
2241+
example: 51
22132242
CreatedAt:
22142243
description: |
22152244
Date and time at which the build cache was created in
@@ -2227,6 +2256,7 @@ definitions:
22272256
example: "2017-08-09T07:09:37.632105588Z"
22282257
UsageCount:
22292258
type: "integer"
2259+
example: 26
22302260

22312261
ImageID:
22322262
type: "object"
@@ -8526,6 +8556,29 @@ paths:
85268556
UsageData:
85278557
Size: 10920104
85288558
RefCount: 2
8559+
BuildCache:
8560+
-
8561+
ID: "hw53o5aio51xtltp5xjp8v7fx"
8562+
Parent: """
8563+
Type: "regular"
8564+
Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
8565+
InUse: false
8566+
Shared: true
8567+
Size: 0
8568+
CreatedAt: "2021-06-28T13:31:01.474619385Z"
8569+
LastUsedAt: "2021-07-07T22:02:32.738075951Z"
8570+
UsageCount: 26
8571+
-
8572+
ID: "ndlpt0hhvkqcdfkputsk4cq9c"
8573+
Parent: "ndlpt0hhvkqcdfkputsk4cq9c"
8574+
Type: "regular"
8575+
Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
8576+
InUse: false
8577+
Shared: true
8578+
Size: 51
8579+
CreatedAt: "2021-06-28T13:31:03.002625487Z"
8580+
LastUsedAt: "2021-07-07T22:02:32.773909517Z"
8581+
UsageCount: 26
85298582
500:
85308583
description: "server error"
85318584
schema:

docs/api/v1.41.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,23 +2244,52 @@ definitions:
22442244

22452245
BuildCache:
22462246
type: "object"
2247+
description: |
2248+
BuildCache contains information about a build cache record.
22472249
properties:
22482250
ID:
22492251
type: "string"
2252+
description: |
2253+
Unique ID of the build cache record.
2254+
example: "ndlpt0hhvkqcdfkputsk4cq9c"
22502255
Parent:
2256+
description: |
2257+
ID of the parent build cache record.
22512258
type: "string"
2259+
example: "hw53o5aio51xtltp5xjp8v7fx"
22522260
Type:
22532261
type: "string"
2262+
description: |
2263+
Cache record type.
2264+
example: "regular"
2265+
# see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84
2266+
enum:
2267+
- "internal"
2268+
- "frontend"
2269+
- "source.local"
2270+
- "source.git.checkout"
2271+
- "exec.cachemount"
2272+
- "regular"
22542273
Description:
22552274
type: "string"
2275+
description: |
2276+
Description of the build-step that produced the build cache.
2277+
example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
22562278
InUse:
22572279
type: "boolean"
2280+
description: |
2281+
Indicates if the build cache is in use.
2282+
example: false
22582283
Shared:
22592284
type: "boolean"
2285+
description: |
2286+
Indicates if the build cache is shared.
2287+
example: true
22602288
Size:
22612289
description: |
22622290
Amount of disk space used by the build cache (in bytes).
22632291
type: "integer"
2292+
example: 51
22642293
CreatedAt:
22652294
description: |
22662295
Date and time at which the build cache was created in
@@ -2278,6 +2307,7 @@ definitions:
22782307
example: "2017-08-09T07:09:37.632105588Z"
22792308
UsageCount:
22802309
type: "integer"
2310+
example: 26
22812311

22822312
ImageID:
22832313
type: "object"
@@ -8739,6 +8769,29 @@ paths:
87398769
UsageData:
87408770
Size: 10920104
87418771
RefCount: 2
8772+
BuildCache:
8773+
-
8774+
ID: "hw53o5aio51xtltp5xjp8v7fx"
8775+
Parent: """
8776+
Type: "regular"
8777+
Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
8778+
InUse: false
8779+
Shared: true
8780+
Size: 0
8781+
CreatedAt: "2021-06-28T13:31:01.474619385Z"
8782+
LastUsedAt: "2021-07-07T22:02:32.738075951Z"
8783+
UsageCount: 26
8784+
-
8785+
ID: "ndlpt0hhvkqcdfkputsk4cq9c"
8786+
Parent: "ndlpt0hhvkqcdfkputsk4cq9c"
8787+
Type: "regular"
8788+
Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache"
8789+
InUse: false
8790+
Shared: true
8791+
Size: 51
8792+
CreatedAt: "2021-06-28T13:31:03.002625487Z"
8793+
LastUsedAt: "2021-07-07T22:02:32.773909517Z"
8794+
UsageCount: 26
87428795
500:
87438796
description: "server error"
87448797
schema:

0 commit comments

Comments
 (0)