GithubHelp home page GithubHelp logo

grafana / k6-circleci-orb Goto Github PK

View Code? Open in Web Editor NEW
5.0 127.0 4.0 51 KB

CircleCI k6 Orb

Home Page: https://circleci.com/developer/orbs/orb/grafana/k6

License: MIT License

Shell 41.73% JavaScript 58.27%

k6-circleci-orb's Issues

No JSON file output when using circleCI orb for k6

Orb version: grafana/[email protected]

What happened:

I am using a near copy of the guidance from the tutorial document I shared below:

version: 2.1
orbs:
grafana: grafana/[email protected]
workflows:
load_test:
jobs:

  • grafana/k6:
    script: loadtests/performance-test.js --out json=full.json > /tmp/artifacts

While I can see there is output occurring due to circleCI artifacts tab having the following contents (I have broken the link on purpose for security reasons):

tmp/artifacts

When I click on that artifact, it is not json, it is typical output you get in CLI, such as this:

execution: local
script: loadtests/performance-test.js
output: json (full.json)

scenarios: (100.00%) 1 scenario, 1 max VUs, 40s max duration (incl. graceful stop):
* protocol: 1 looping VUs for 10s (exec: protocol, gracefulStop: 30s)

There is no JSON file on the filesystem

Expected behavior:

I would expect the JSON file to be available on the filesystem. I see the uploading artifacts step occur but I cannot see that JSON file anywhere. Perhaps I'm missing something?

Uploading /tmp/artifacts to tmp/artifacts
Uploading /tmp/artifacts (3.1 kB): DONE
Total size uploaded: 3.1 KiB

Additional Information:

Hello,

I'm attempting to use the k6 orb to run k6 tests via circleCI. I am able to achieve this by following the guidance here: https://grafana.com/blog/2022/03/06/load-testing-with-circleci/

CircleCI Review

Hello All,

My name is Kyle from the CircleCI Community and Partner Engineering team following up on my email with some review items on the current orb.

  1. If the command is not meant to be used by end-users, do not create it.
    a. Instead, simply contain all logic within the job. No commands are needed.
    b. https://github.com/k6io/circleci-orb/blob/main/src/commands/run-test.yml
  2. Allow the user to specify a specific docker tag.
    a. https://github.com/k6io/circleci-orb/blob/a1ae46a30dcd2fd80640c3a98f2fb3c95f1771fe/src/jobs/test.yml#L4
    b. Parameterize the tag portion of the docker image.
    c. Specifying a tag is important for CI so users can test against known and good versions.
    e. Example: https://github.com/CircleCI-Public/node-orb/blob/3d313ec2fbc9dd2a5c804d9b142e2419c4176ca4/src/executors/default.yml#L14
  3. Private information should be accessed via environment variables, not hard-coded strings in the config.
    a. https://github.com/k6io/circleci-orb/blob/a1ae46a30dcd2fd80640c3a98f2fb3c95f1771fe/src/jobs/test.yml#L23
    b. https://circleci.com/docs/2.0/orb-author-faq/?section=configuration#secure-api-tokens

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.