1

我想使用 IBM Bluemix DevOps Services,尤其是自动化管道,通过构建、测试传递最后推送的提交,然后在测试环境中部署。

我找到的所有指南都建议将一个存储库与服务器和应用程序放在一起,并将此存储库链接到管道。虽然这样的配置有效,但我觉得它违反了 Django 标准。应用程序(我开发的)应该与服务器分开(即:在另一个 git repo 上)(这只是使应用程序工作的一部分)。

我不知道如何处理这种情况。我是不是该:

  • 编写一个构建脚本,用于git clone检索像https://github.com/fe01134/djangobluemix这样的构建包,然后修改适当的文件;
  • 找到一种将两个 git 存储库附加到一个管道的方法;
  • 忘记这个想法并采用 IBM 推荐的方式将服务器和应用程序放在同一个 repo 上?
4

2 回答 2

1

It seems as though what you are trying to do is create your own buildpack (by cloning the Django one and editing it).

Bluemix supports 3rd party buildpacks from any public git repo so your best bet is to do the following:

  1. Fork the django buildpack and make the required edits for your app
  2. Put your application in it's own repo
  3. Point the pipeline at this repo and configure your build/test/deploy stages
  4. Configure your "deploy" stage to use your newly modified buildpack by either including a buildpack line in your manifest.yml or modifying the deploy script to cf push -b http://yourbuildpackurl.git "${CF_APP}"
于 2017-05-10T12:01:56.050 回答
0

此示例仅使用一个文件来指定对 Django 的依赖项,而不是将其放入您的存储库中(在第 4 步中):

https://www.ibm.com/developerworks/cloud/library/cl-worldbank-charting-app/

于 2017-05-10T12:19:34.313 回答