Hello all,
I'm relatively new to Bitbucket Pipelines and am facing an issue where my pipeline fails to connect to a service running on localhost:3000
during a test phase. I've set up a pipeline to automate testing on the OWASP Juice Shop application, running it in one step and then attempting to run k6 tests against it in the next.
My bitbucket-pipelines.yml
looks like this:
pipelines:
default:
- step:
name: "Run Juice Shop"
image: docker:stable
services:
- docker
script:
- docker pull bkimminich/juice-shop
- docker run --rm -p 3000:3000 bkimminich/juice-shop
- sleep 20 # Allows time for Juice Shop to start
- step:
name: "Run k6 Tests"
image: grafana/k6:master-with-browser
script:
- k6 run k6/Basictest.js
The Juice Shop application starts successfully and is accessible on localhost:3000
. However, when it comes to running the k6 tests in the second step, the tests fail because they cannot connect to the Juice Shop running on localhost:3000
. I suspect the issue lies in how networking is handled between the steps or maybe a misconfiguration on my part.
Is there a specific approach to ensure services started in one step are accessible in subsequent steps, especially for localhost connections?
I'm eager to learn and fix this issue, so any insights, advice, or resources you could share would be highly appreciated!
Thank you for your time and help!
Hello, Good day. Please move this query to Bitbucket community discussions : https://community.atlassian.com/t5/Bitbucket-questions/qa-p/bitbucket-questions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.