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?
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The formatting is off as far as indentation for the purposes of this answer, but the indentation in the actual .yml file is correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.