You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
pipelines:
default:
- step:
name: Build and test
caches:
- 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>
script:
- cat <script>.sh | ssh <user>@<host>
- echo "Deploy step finished"
**ERRORS**
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-modules
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
E
======================================================================
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/failure.py", 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.001s
FAILED (errors=1)
**Questions**
- ```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
Hi!
Please, try to change everything and validate it here
https://bitbucket-pipelines.prod.public.atl-paas.net/validator
Typically I do check in the bitbucket or github repo the examples and replace as is
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.