Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document custom templates support in k6 new #1889

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewslotin
Copy link
Contributor

What?

Document custom script templates support coming in k6 v1.0.0-rc1.

Checklist

  • I have used a meaningful title for the PR.
  • I have described the changes I've made in the "What?" section above.
  • I have performed a self-review of my changes.
  • I have run the npm start command locally and verified that the changes look good.
  • I have made my changes in the docs/sources/k6/next folder of the documentation.

Related PR(s)/Issue(s)

grafana/k6#4618

@andrewslotin andrewslotin added the Area: OSS Content Improvements or additions to community/oss documentation label Mar 12, 2025
@andrewslotin andrewslotin requested review from heitortsergent and a team as code owners March 12, 2025 17:11
@andrewslotin andrewslotin requested review from oleiade and olegbespalov and removed request for a team March 12, 2025 17:11

```bash
k6 new --template protocol
```

### --project-id

The `--project-id` allows you to specify a Grafana Cloud k6 project ID. The generated script is then configured to run in that project.
The `--project-id` allows you to specify a Grafana Cloud k6 project ID. The generated script is then configured to run in that project. To include the project ID in your custom template, use `{{ .ProjectID }}` as a placeholder, for example:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `--project-id` allows you to specify a Grafana Cloud k6 project ID. The generated script is then configured to run in that project. To include the project ID in your custom template, use `{{ .ProjectID }}` as a placeholder, for example:
The `--project-id` flag allows you to specify a Grafana Cloud k6 project ID. The generated script is then configured to run in that project. To include the project ID in your custom template, use `{{ .ProjectID }}` as a placeholder, for example:

Copy link
Collaborator

@heitortsergent heitortsergent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewslotin thanks for opening this PR! I think the changes look good. This could be a separate PR, but what do you think about adding some examples for creating a custom template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OSS Content Improvements or additions to community/oss documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants