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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket YLM pipeline to deploy on Digital Ocean ERROR

I am following this guide to create a pipeline to deploy my Django project to Digital Ocean, Ubuntu 18 droplet.

**What I have done**

1. SSH key generated and added to my remote server and bitbucket
2. Synced yml file with project
3. bitbucket-pipelines.yml

image: python:3.7.3

- step:
name: Build and test
- pip
script: # Modify the commands below to build your repository.
- pip install -r requirements.txt
- nosetests test/autotests --with-xunit --xunit-file=nosetests.xml --with-coverage --all-modules
- step:
name: Deploy to <myserver>
- cat <script>.sh | ssh <user>@<host>
- echo "Deploy step finished"



I had to do the following in terminal within my virtual environment

pip install nose
pip install coverage
pip freeze > requirements.txt

than commit and push the file to bitbucket

When I run the pipeline on Bitbucket I get the following ERROR

+ nosetests test/autotests --with-xunit --xunit-file=nosetests.xml --with-coverage --all-modulesnose.plugins.cover: ERROR: Coverage not available: unable to import coverage moduleE======================================================================ERROR: Failure: OSError (No such file /opt/atlassian/pipelines/agent/build/test/autotests)----------------------------------------------------------------------Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/nose/", line 42, in runTest raise self.exc_class(self.exc_val)OSError: No such file /opt/atlassian/pipelines/agent/build/test/autotests----------------------------------------------------------------------Ran 1 test in 0.001sFAILED (errors=1)



- ```ssh <user>@<host>``` I do understand how to replace ```<user>``` & ```<host>```
- A.) How I should replace ```<script>``` at ```cat <script>.sh ```
- B.) How I should replace ```<myserver>``` at ```name: Deploy to <myserver>``` is this my server's IP address?
- C.) at the bottom section this guide has the following code I do not know what to do whit this?

#!/usr/bin/env bash
echo "Deploy script started"
cd <project git directory>
git pull
sh <restart project>.sh


1 answer

0 votes


Please, try to change everything and validate it here


Typically I do check in the bitbucket or github repo the examples and replace as is

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Share your use cases: How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features to how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your tea...

44 views 0 1
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you