Skip to content

Commit e73a768

Browse files
committed
binary provisioning: GA
Signed-off-by: Pablo Chacin <[email protected]>
1 parent dee01bf commit e73a768

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

docs/sources/k6/next/extensions/run-extensions-using-binary-provisioning.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
11
---
2-
labels:
3-
products:
4-
- cloud
52
title: 'Run extensions using Binary Provisioning'
63
description: 'Learn how to run scripts that require extensions using Binary Provisioning.'
74
weight: 04
85
---
96

107
# Run extensions using Binary Provisioning
118

12-
{{< admonition type="caution" >}}
13-
14-
This is an experimental feature. Breaking changes might occur prior to the feature being made generally available.
15-
16-
{{< /admonition >}}
17-
189
k6 supports [extensions](https://grafana.com/docs/k6/<K6_VERSION>/extensions/) as a way of extending k6 native functionality, and support a wider variety of use cases.
1910

20-
Using k6 with extensions locally requires users to build a [custom k6 binary](https://grafana.com/docs/k6/<K6_VERSION>/extensions/#xk6-makes-custom-binaries) that includes the extension, which can then be used to run a test script. With the Binary Provisioning feature, Grafana Cloud k6 users can run tests with a [limited set of extensions](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/use-k6-extensions/#supported-extensions-in-grafana-cloud), without having to manually build a k6 binary.
21-
22-
The `archive` and `inspect` commands also support Binary Provisioning to allow creating archives for Grafana Cloud.
11+
Using k6 with extensions locally requires users to build a [custom k6 binary](https://grafana.com/docs/k6/<K6_VERSION>/extensions/#xk6-makes-custom-binaries) that includes the extension, which can then be used to run a test script. With the Binary Provisioning feature, k6 users can run tests using extensions without having to manually build a k6 binary.
2312

2413
## Before you begin
2514

2615
To use Binary Provisioning, you'll need:
2716

28-
- k6 v1.0 or greater [installed on your machine](https://grafana.com/docs/k6/latest/set-up/install-k6/).
29-
- A [Grafana Cloud account](https://grafana.com/auth/sign-up/create-user).
17+
- k6 v1.2 or greater [installed on your machine](https://grafana.com/docs/k6/latest/set-up/install-k6/).
3018

31-
## Set the Binary Provsioning environment flag
19+
## Set the Binary Provisioning environment flag
3220

3321
To enable Binary Provisioning, you must set the `K6_BINARY_PROVISIONING` environment variable to `true`:
3422

@@ -49,13 +37,27 @@ $Env:K6_BINARY_PROVISIONING = "true"
4937

5038
{{< /code >}}
5139

52-
## Log in to Grafana Cloud
40+
## Enable community extensions (Optional)
41+
42+
By default the Binary Provisioning allows using [a limited set of officially supported extensions](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/use-k6-extensions/#supported-extensions-in-grafana-cloud). With the `ENABLE_COMMUNITY_EXTENSIONS` all extension in the extensions registry are available.
43+
44+
> When running tests in the cloud only the officially supported extensions are allowed.
45+
46+
{{< code >}}
47+
48+
```linux
49+
export ENABLE_COMMUNITY_EXTENSIONS=true
50+
```
51+
52+
```mac
53+
export ENABLE_COMMUNITY_EXTENSIONS=true
54+
```
5355

54-
To use Binary Provisioning, you must [authenticate to Grafana Cloud](https://grafana.com/docs/grafana-cloud/testing/k6/author-run/tokens-and-cli-authentication/#authenticate-with-the-login-command) using the `k6 cloud login` command:
56+
```windows-powershell
57+
$Env:ENABLE_COMMUNITY_EXTENSIONS = "true"
5558
56-
```bash
57-
k6 cloud login --token <API_TOKEN>
5859
```
60+
{{< /code >}}
5961

6062
## Run a test
6163

@@ -97,7 +99,7 @@ You should see an output similar to the following:
9799

98100
```sh
99101
INFO[0000] The current k6 binary doesn't satisfy all dependencies, it is required to provision a custom binary. deps="k6/x/faker*"
100-
INFO[0000] A new k6 binary has been provisioned with version(s): k6:v1.0.0 k6/x/faker:v0.4.3
102+
INFO[0000] A new k6 binary has been provisioned with version(s): k6:v1.2.0 k6/x/faker:v0.4.3
101103
time="2025-04-24T12:59:24+02:00" level=info msg=Zelma source=console
102104
103105
@@ -116,7 +118,4 @@ The output includes information about which dependencies were detected, and the
116118
117119
## Limitations
118120
119-
- Only extensions supported in Grafana Cloud are supported.
120121
- Output extensions are not supported.
121-
- Running scripts from stdin is not supported.
122-
- Only files with extensions `.js`, `.ts` or `.tar` can be used. Other extensions will not invoke the Binary Provisioning mechanism.

0 commit comments

Comments
 (0)