Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipelines: How to get speedtest-cli working?

Daniel Disbrow October 4, 2018

I've got a pipeline that I'm trying to do some cloud testing with.

It's running Python, and the very first step installs the dependencies that I need to run the rest of the .yml file.

 

Yet, when it gets to the next script, it says it can't find the module that it just installed. I've run this same script (with the exact same syntax) on hardware and it works. Is there something to Bitbucket Pipelines that I'm missing? I've read the documentation on configuring Pipelines, both in general and specifically for Python, and it's running the exact same version as the hardware I've tested these same scripts on.

 

The script that's running is prefixed by #!/usr/bin/python, if that helps.

 

Is there something integral to Pipelines that this messes up?

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2018

Hi Daniel,

Can you include a copy of your bitbucket-pipelines.yml here, so we can double check your commands?

Have you also tried debugging this locally with docker? Rather than just on your own machine (as you may have other things setup correctly affecting your result).

Thanks,

Phil

Daniel Disbrow October 8, 2018
image: python
pipelines:
default:
-
step:
name: Prerequisites Install
script:
-
pip install requests speedtest-cli
artifacts:
-
dist/**

-
step: # test
deployment: production
name: test
script:
-
python test.py production

 


Passed config test through https://bitbucket-pipelines.prod.public.atl-paas.net/validator

The error I'm getting is on step 2, which is that the speedtest module doesn't exist.

 

Not using Docker in any part of the installation. Why would debugging with Docker help?

Daniel Disbrow October 8, 2018

The formatting is off as far as indentation for the purposes of this answer, but the indentation in the actual .yml file is correct.

Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2018

Hi Daniel,

The bitbucket-pipelines.yml looks fine to me.

Can you double check that the files exist in the directory you're expecting to find them in? The following 'ls' commands should suffice.

image: python
pipelines:
default:
-
step:
name: Prerequisites Install
script:
-
pip install requests speedtest-cli
- ls -Rla dist
artifacts:
-
dist/**

-
step: # speedtest with throughput
deployment: production
name: Speedtest with Throughput
script:
- ls -Rla dist
-
python ubidots_speedtest_throughput.py production
...

 

Daniel Disbrow October 9, 2018

They come back in the right directory, but there's an internal command within the files themselves that I'm having issues with that's coming back with this. 

 

Capture.JPG

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events