# Running k6 inside CircleCI pipeline

**URL:** <https://community.grafana.com/t/running-k6-inside-circleci-pipeline/97099>\
**Category:** Cloud Support\
**Created:** [April 1, 2023, 9:30am UTC](https://community.grafana.com/t/running-k6-inside-circleci-pipeline/97099 "2023-04-01T09:30:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moonbridge](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/moonbridge/32/34770_2.png) [@moonbridge](https://community.grafana.com/u/moonbridge)\
**Post date:** [April 1, 2023, 9:30am UTC](https://community.grafana.com/t/running-k6-inside-circleci-pipeline/97099/1 "2023-04-01T09:30:21Z")

</div>

Hi there,

I have already k6 cloud (free) account and CircleCI configured to run k6 there along with the existing workflows, orbs etc (not grafana/k6 orb).

I think it is possible to use k6 cloud for free just to transfer the output results there from k6 testing in CircleCI?

So, I would like to configure my CircleCI pipeline (.circleci/config.yml) and I already set `K6_CLOUD_TOKEN` variable in CircleCI.

What else I need to do in order to make this happen? I tried to just put `cloud: true` in my workflow in `config.yml`, but then I have failed CI pipeline saying that `cloud` is not permitted to use (extraneous key [cloud] is not permitted).

As mentioned, I have jobs, workflows… but for a single `performance_tests` workflow I would like to transfer every test run to k6 cloud, if possible.

Example job:

```auto
performance_tests:
    working_directory: /home/circleci/project
    machine:
      image: ubuntu-2204:2022.10.2
      docker_layer_caching: false
    parameters:
      mysql_command:
        type: string
        default: ''
      mysql_image:
        type: string
        default: ''
      wordpress_image_version:
        type: string
        default: ''
      url:
        type: string
        default: 'http://localhost:9500'
      pw:
        type: string
        default: 'password'
      scenario:
        type: string
        default: 'pullrequests'
    steps:....
    .. .. ..

```

---

<div class="post-metadata">

**Author:** ![moonbridge](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/moonbridge/32/34770_2.png) [@moonbridge](https://community.grafana.com/u/moonbridge)\
**Post date:** [April 4, 2023, 3:04pm UTC](https://community.grafana.com/t/running-k6-inside-circleci-pipeline/97099/3 "2023-04-04T15:04:12Z")

</div>

Ok, I fixed it. Followed this doc:

> **[Cloud](https://k6.io/docs/results-output/real-time/cloud/)**
>
> When streaming the results to the cloud, the machine - where you execute the k6 CLI command - runs the test and uploads the results to the cloud. Then, you will be able to visualize and analyze the results on the web app in real-time.
