Python Bitbucket YLM管道将部署在数字海洋上
我按照指南创建一条管道,将我的Django项目部署到数字海洋Ubuntu18Droplet 我所做的Python Bitbucket YLM管道将部署在数字海洋上,python,bash,git,bitbucket,digital-ocean,Python,Bash,Git,Bitbucket,Digital Ocean,我按照指南创建一条管道,将我的Django项目部署到数字海洋Ubuntu18Droplet 我所做的 生成SSH密钥并添加到我的远程服务器和bitbucket 已将yml文件与项目同步 bitbucket-pipelines.yml image:python:3.7.3 管道: 违约: -步骤: 名称:构建和测试 缓存: -皮普 脚本:#修改以下命令以构建存储库。 -pip安装-r requirements.txt -nosetests测试/自动测试——使用xunit——xunit file=n
image:python:3.7.3
管道:
违约:
-步骤:
名称:构建和测试
缓存:
-皮普
脚本:#修改以下命令以构建存储库。
-pip安装-r requirements.txt
-nosetests测试/自动测试——使用xunit——xunit file=nosetests.xml——覆盖率——所有模块
-步骤:
名称:部署到
脚本:
-cat.sh|ssh@
-echo“部署步骤已完成”
错误
在Bitbucket上运行管道时,出现以下错误
nosetests test/autotests --with-xunit --xunit-file=nosetests.xml --with-coverage --all-modules
<1s
+ nosetests test/autotests --with-xunit --xunit-file=nosetests.xml --with-coverage --all-modules
bash: nosetests: command not found
nosetests测试/自动测试——使用xunit——xunit文件=nosetests.xml——覆盖率——所有模块
ssh@
需要将用户放在您试图通过SSH连接的本地服务器上
是您尝试连接的本地服务器的域或IP地址
- 如何更换at
cat.sh
是已写入Bitbucket云存储库的shell脚本
- 如何替换at
name:Deploy to
可以保存名称文本,而不管上面写了什么
- 请使用建议的值,您应该可以开始了。所有这些都是Bitbucket云不持有的变量值,实际上是您在本地配置的
您的问题是“nosetests:command not found”,因此您不需要调试cat
或ssh
(尚未)。您的容器映像python:3.7.3要么没有随此实用工具提供-nosetests
,要么它在requirements.txt文件中丢失。
nosetests test/autotests --with-xunit --xunit-file=nosetests.xml --with-coverage --all-modules
<1s
+ nosetests test/autotests --with-xunit --xunit-file=nosetests.xml --with-coverage --all-modules
bash: nosetests: command not found
#!/usr/bin/env bash
echo "Deploy script started"
cd <project git directory>
git pull
sh <restart project>.sh
echo "Deploy script finished execution"