You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/openfaas-pro/builder.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -290,6 +290,58 @@ You may need to enable build arguments for the Dockerfile, these can be passed t
290
290
}
291
291
```
292
292
293
+
## How to stream the logs and status output from a build
294
+
295
+
> Note: this feature requires a version later than `0.4.3`.
296
+
297
+
By default, the builder will prepare all logs and statuses in memory, and to send them after the build is completed.
298
+
299
+
If you would like to display live feedback to your users, you can set a HTTP Accept header of `application/x-ndjson` and the builder will stream the logs and status output as they are generated.
300
+
301
+
```bash
302
+
curl -H "Accept: application/x-ndjson" \
303
+
-H "X-Build-Signature: sha256=$HMAC" \
304
+
--silent \
305
+
http://127.0.0.1:8081/build -X POST --data-binary @req.tar | jq
306
+
```
307
+
308
+
The intermediate output is identified by the `status` field containing `in_progress`:
0 commit comments