Search code examples
djangoibm-cloudpipelinedevops-services

Server and application on two different git repositories


I want to use the IBM Bluemix DevOps Services, and more especially the automated pipeline to pass the last pushed commit through the build, the tests, then deploy in a test environment.

All the guides I found recommend having one repo with the server and application together, and link this repo to the pipeline. While such a configuration works, I feel like it is against the Django standards. The application (what I develop) should be separated (ie: on another git repo) from the server (which is just a part to make the application work).

I do not know how to manage this situation. Should I:

  • Write a build script which uses git clone to retrieve a build-pack like https://github.com/fe01134/djangobluemix then modify the adequate files ;
  • Find a way to attach two git repositories to one pipeline ;
  • Forget the idea and go for the IBM recommended way to have the server and the application on the same repo?

Solution

  • 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}"