Hello,
we are hosting our code in a GitLab instance and would like to deploy our "master branch" after every successful merge to Bluemix. Is there a way to achieve that?
thanks in advance peter
Answer by @chughts (12979) | Sep 17, 2015 at 03:54 AM
Maybe this will do the trick -https://developer.ibm.com/devops-services/2015/02/18/share-code-new-deploy-bluemix-button/ "share you code with the deploy to bluemix button"
That will create a "non-connected" clone of my GitLab repro in Bluemix DevOps Services GIT, right? So in the future when I change something in my GitLab repro it would not automatically be deployed.
Answer by Tox (288) | Sep 17, 2015 at 09:26 AM
Peter,
What is the issue that you are struggling with? Are you able to push your master branch to a different repository, one that the DevOps services is aware of? If you can do that, then the issue is just in building a delivery pipeline, and that is pretty simple. If the delivery pipeline is not "aware" of the GitLab instance, then it cannot monitor it and kick off a CI build (and subsequent deploy) with every push of changes to the master.
That might be the problem ;) I am currently not aware of how I can push the master branch from a GitLab repro to a different GIT server. (WebHooks and Services are available but I did not see a suitable one so far.)
I guess for GitHub there was one developed that does the job? Is something similar available for GitLab?
Is there really no automatic way to achieve that?
Answer by Philippe Mulet (286) | Jan 07, 2016 at 05:20 AM
I think you should be able to configure the cloned Git repo at DevOps Services as a remote of your Gitlab master repo. Then you can propagate your changes from your Gitlab repo to the remote, which will automatically build/deploy it, as Tox was suggesting.
See also: https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes