Can K6 be used with Google Cloud Build?

Hi,

Is there anyone that already tried to integrate K6 with Google Cloud Build?
I suppose that there is nothing special to be done, and that can be run from there?

Greetings!

Hi Kris,

Google Cloud Build is just another CI/CD tool like any other, so it is expected to support running a tool like k6. In addition, k6 has a docker image, that you can easily pull and work with:
https://hub.docker.com/r/loadimpact/k6

These are the CI/CD platform we already have written about:
Integration and Tools: Continuous Integration and Continuous Delivery

1 Like

That’s what I though.

Thanks Mostafa.

1 Like

@kris - can you please help me in setting up my K6 scripts to run in GCP? Any high level steps welcome.

@mostafa - can you please help me in setting up my K6 scripts to run in GCP? Any high level steps welcome.

You should be able to incorporate it into your existing build pipeline using the docker builder. I have not tried this code, but it should be something along the lines of:

  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', 'docker.io/loadimpact/k6', 'YOUR_SCRIPT_RELATIVE_TO_YOUR_WORKDIR.js']

Best,
Simme

@simme - All good thanks… minor correction.

  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', 'docker.io/loadimpact/k6','run', 'YOUR_SCRIPT_RELATIVE_TO_YOUR_WORKDIR.js']
1 Like

@kris
Use this link to run cloud build in K6.

1 Like

Check out this tutorial to integrate k6 with Google Cloud Build.