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

My local MONGODB instance not updated by python script in pipeline

zb September 26, 2019
pipelines:  
branches:
bb_pipeline:      
step:          
namepopulate_results          
imagepython:3.7          
script:            
pip install pymongo            
pip install datetime            
python tes.py          
services:            -
mongo
definitions:  
services:
mongo:      
imagemongo
variables:
MONGO_URL: mongodb://localhost:27017/

As you can see my pipeline is a simple one. It will call the test.py script to connect to my local mongodb instance, extract information and populate the results back and save the documents back to the local instance. If I were to run the `test.py` script on its' own, it will behave accordingly. Are there syntax that are missing within my `.yml` file? 

I have search the documentation on Atlassian, and it doesnt tell you how i can include variables for mongodb connection. Can someone help me out or point me in the right sources? Thanks!!!!

1 answer

0 votes
mkleint
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2019

it's not clear what is the error is you are getting from your problem description.

The yaml definition looks ok. Apart from formatting that is. It seems your indention is wrong at places but really can't tell if that's related to the formatting in the question only.

 

If you take a look at https://confluence.atlassian.com/bitbucket/use-services-and-databases-in-bitbucket-pipelines-874786688.html it describes how to define a service and how to include variables to configure that service.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events