How can I use external git repository and customized app type?

288 views
Skip to first unread message

zhang...@gmail.com

unread,
Oct 27, 2016, 7:11:57 PM10/27/16
to fabric8
Hello everyone, I want to use fabric8 as out ci platform, but there are two problems bothering me.

1.We have a private git repo where a lot code have been and we cannot afford a migration. I have checked configmap of fabric8-forge and jenkins in k8s, but there are only settings like jenkins-gogs-email/jenkins-gogs-password/jenkins-gogs-user. How can I use my own git repo instead of build-in gogs?

2.We want to create a customized project type in the "Create A New Project" page but don't know how. I have tried to track the ajax in that page but failed.Can anyone help me?

Thank you very much.

jer...@saasindustries.com

unread,
Oct 27, 2016, 7:17:41 PM10/27/16
to fabric8
I am also interested in this. Gogs is much less of a git repository solution than Github and Gitlab. With Gitlab, enterprise version is pretty great as an on-premise. But I have it also on my todo list to see how Github can be used in conjunction with fabric8 instead of gogs. Worst case, if I need to go on-premise, I would chose Gitlab enterprise over Gogs. Wondering the best practice of changing these out as well. Any documentation on this?

Kurt Stam

unread,
Oct 27, 2016, 9:56:15 PM10/27/16
to jer...@saasindustries.com, fabric8
--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

zhang...@gmail.com

unread,
Oct 28, 2016, 2:38:02 AM10/28/16
to fabric8, jer...@saasindustries.com
Hi Kurt

Thank you very much for your reply, I have read the post you mentioned, but it seems that it was just telling jenkins to fetch code from private git repo, and fabric8-forge will still create app in build-it git repo, won't it?

在 2016年10月28日星期五 UTC+8上午9:56:15,Kurt Stam写道:

Kurt T Stam

unread,
Oct 28, 2016, 10:03:47 AM10/28/16
to fab...@googlegroups.com, James Rawlings
Well no actually, it really does /everything/ gogs would be doing for you.

However, the project workflows need an additional step that is not there at the moment which is 'promotion'. Every commit, is a tag in your local git clone on Jenkins (and not in the remote git). Right after (or before) you 'Release to production' you'd want to 'promote' your artifacts. At that point you'd:

- push that tag to the remote git
- move your artifacts from 'staging' in nexus to the release repo
- push docker images to dockerhub or your private repo.

The idea is that you don't want to permanently store or the immediate build data for builds you don't want to keep and clutter up git, nexus and the docker registry.

We actually have this functionality in our private workflows to build fabric8 itself. Maybe James R can tell us if there are plans to add this promotion step to the project workflows too.

Hope this makes sense,

--Kurt

zhang...@gmail.com

unread,
Oct 28, 2016, 11:03:10 AM10/28/16
to fabric8, rawli...@gmail.com
Oh,  is there any possibility that I can use my own git repo completely - I mean, when I create a new project in 'Create A New Project' page, it can be pushed to our private repo. Since we already have much code in private repo, we don't need to maintain two different repos.

在 2016年10月28日星期五 UTC+8下午10:03:47,Kurt Stam写道:

Kurt T Stam

unread,
Oct 28, 2016, 11:30:04 AM10/28/16
to fab...@googlegroups.com
Yes, that's exactly what that blog post describes:

https://medium.com/@kurt.stam/jenkins-on-kubernetes-with-private-git-repositories-4e0186a194eb#.bbz60xlr7

In this case you will not be using gogs at all. It's just that the 'promotion' step is missing from the workflows at the moment.

--Kurt

zhang...@gmail.com

unread,
Oct 29, 2016, 10:23:21 PM10/29/16
to fabric8
I have read the code of fabric8-forge yesterday and sadly found that's impossible.In io.fabric8.repo.git.GitRepoKubernetes I found the code snippet as follows:

It seems that the address of git repo address when creating a new project is hard-coded there, and there is no way to configure it, isn't it?


Anyway, thanks for your help!



在 2016年10月28日星期五 UTC+8下午11:30:04,Kurt Stam写道:

Kurt Stam

unread,
Oct 30, 2016, 12:56:12 AM10/30/16
to zhang...@gmail.com, fabric8
Yes you are probably right. The workaround would be to check the new project out locally and then push it to the remote repo. After that you can create a job for 'an existing' project and specify the remote repo. Ugly :(. Looks like that needs fixing!

James Rawlings

unread,
Oct 30, 2016, 4:36:27 AM10/30/16
to zhang...@gmail.com, fab...@googlegroups.com, Kurt Stam
At the moment the only Git hosting app that we've fully integrated into the fabric8 create project wizard is Gogs, however we will be integrating with GitLab soon.  It's certainly the aim to be able to plugin in and swap out different tools that suit teams needs.

There's an old issue that up until recently hasn't been a priority to integrate with GitLab that you can track here https://github.com/fabric8io/fabric8/issues/4639.

James.

--
James Rawlings
Engineering
Red Hat, Inc.
Blog: https://medium.com/@jdrawlings
Twitter: @jdrawlings

https://fabric8.io/
https://blog.fabric8.io/

Kurt Stam

unread,
Oct 30, 2016, 1:18:24 PM10/30/16
to James Rawlings, zhang...@gmail.com, fab...@googlegroups.com
Cool, the easy fix for now would be to stick the git base URL in the configmap. 

yasha...@boomerangcommerce.com

unread,
Dec 14, 2017, 2:12:42 AM12/14/17
to fabric8
Hi,
 We are evaluating moving to Fabric8. Has there been any progress on making repository hosting pluggable? We are using unfuddle as the repo.

-Yashasvini
Reply all
Reply to author
Forward
0 new messages