首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >比特桶YLM管道在数字海洋上的部署

比特桶YLM管道在数字海洋上的部署
EN

Stack Overflow用户
提问于 2020-03-21 16:15:59
回答 1查看 582关注 0票数 0

我正在按照指南创建管道,将我的Django项目部署到数字海洋,Ubuntu18液滴。

我做了什么,

  1. 生成SSH密钥并添加到我的远程服务器和bitbucket中
  2. 与项目同步的yml文件
  3. bitbucket-pipelines.yml
代码语言:javascript
复制
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"

错误当我在Bitbucket上运行管道时,我得到以下错误

代码语言:javascript
复制
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

问题

  • ssh <user>@<host>我知道如何替换<user> & <host>
  • A.)我应该如何取代<script>cat <script>.sh
  • B.)我应该如何取代<myserver>name: Deploy to <myserver>,这是我的服务器的IP地址吗?
  • C.)在下面的部分,指南有以下代码,我不知道该怎么做?
代码语言:javascript
复制
#!/usr/bin/env bash
echo "Deploy script started"
cd <project git directory>
git pull
sh <restart project>.sh
echo "Deploy script finished execution"
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-04-15 08:46:43

  • ssh <user>@<host>需要让您要通过SSH连接的本地服务器上的用户是您要连接的本地服务器的域或IP地址。
  • 我应该如何在cat <script>.sh替换这个shell脚本,您已经将它写到Bitbucket云存储库中了。
  • 我应该如何在name: Deploy to <myserver>替换可以保存名称文本,而不管写在上面的是什么
  • 请使用建议的值,你应该是好的。所有这些都是变量的值,这些变量不是Bitbucket云所持有的,实际上是本地配置的变量。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60790189

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档