grafana / xk6-amqp

A k6 extension for publishing and consuming messages from queues and exchanges using AMQP 0.9.1.
Apache License 2.0
25 stars 27 forks source link

Facing issue while building xk6 binary #39

Open mayurk-amdocs opened 11 months ago

mayurk-amdocs commented 11 months ago

Hi @javaducky

I followed the steps given in the README #Build and ensured that my $PATH has the location /usr/local/go/bin but seems the system is unable to find xk6. Getting error

$ xk6 command not found

As asked I have also followed process in the README #Development but seems I am having the same issue. Require help in setting up xk6.

MicrosoftTeams-image

javaducky commented 11 months ago

Hi @mayurk-amdocs !

You installed xk6 using go install go.k6.io/xk6/cmd/xk6@latest, correct? If your Go toolchain is correctly in your path, xk6 should be found as well. You may be able to search the correct path using which xk6.

Another solution would be to build your binary within Docker. For example, on a Mac, I'm able to build the custom binary using:

docker run --rm -e GOOS=darwin -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" \
  grafana/xk6 build v0.47.0 \
  --with github.com/grafana/xk6-amqp

If you're on Linux, simply omit the -e GOOS=darwin. The process is described in more detail at https://grafana.com/docs/k6/latest/extensions/build-k6-binary-using-docker/ .

Hope this helps!