pipelines:
branches:
bb_pipeline:
- step:
name: populate_results
image: python:3.7
script:
- pip install pymongo
- pip install datetime
- python tes.py
services: -
- mongo
definitions:
services:
mongo:
image: mongo
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!!!!
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.