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


0 answers

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,886 views 0 7
Read article

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