
Show HN: OneDev – A Lightweight GitLab Alternative - robinshen
https://github.com/theonedev/onedev
======
robinshen
I am dogfooding OneDev at: [https://code.onedev.io/projects/onedev-
server](https://code.onedev.io/projects/onedev-server)

The repository is mirrored to GitHub

~~~
nh2
It even has code intelligence, for example in
[https://code.onedev.io/projects/onedev-
server/blob/master/se...](https://code.onedev.io/projects/onedev-
server/blob/master/server-
core/src/test/java/io/onedev/server/git/AbstractGitTest.java?position=source-26.22-26.37)

Impressive!

Some questions:

* How long did it take you to build OneDev (e.g. in hours time invested)?

* Do you expect it to scale, e.g. to large repos, large histories, many issues?

* I see you have a "code comments" feature with which people can make comments in the actual code tree, as opposed to the commits ([https://code.onedev.io/projects/onedev-server/codecomments](https://code.onedev.io/projects/onedev-server/codecomments)). I implemented this for Google Code Search, nice to see it in more tools! Do your comments survive changes to the file?

And one feature I noticed missing: Pressing "Y" to get a commit-pinned
permalink, like Github, Gitlab, and the other tools do.

Keep it up!

~~~
robinshen
I do this part time since 2012, see code line trends here:
[https://code.onedev.io/projects/onedev-
server/stats/lines](https://code.onedev.io/projects/onedev-server/stats/lines)

I take a lot of time optimizing the performance, and it can easily handle
large amount of issues, projects and large repositories at company scale. For
large repository, please check the linux demo here:
[https://code.onedev.io/projects/linux/blob](https://code.onedev.io/projects/linux/blob)

The code comments can live through file changes, even file renames.

As to commit-pinned permalink, I tried to press Y on GitHub and it does not
have any effect. Can you please shed more light on this?

~~~
toupeira
You have to press Y while viewing a file, it will convert the URL to use the
current SHA.

~~~
robinshen
I see. Filed an issue for further improvement:
[https://github.com/theonedev/onedev/issues/22](https://github.com/theonedev/onedev/issues/22)

------
divbzero
I’m impressed by how well OneDev works on my phone. The mobile UI has clearly
received attention and thoughtful design.

For starters, the README is actually displayed on mobile unlike certain other
Git UIs ( _ahem GitHub_ ).

~~~
abathur
I'm just playing with it on desktop (including the breakpoints) and agree that
the UI feels thoughtful.

I noticed a handful of small things to pick on (and if I'm good I'll go file
issues...), but I like the broad strokes--particularly its use of space (at
all sizes). I also see _a lot_ of small+thoughtful UI/X features and
decisions.

------
tomashubelbauer
Your readme is absolutely delightful. I love the animated screenshots.
Hopefully more projects will take notice of how helpful that is!

~~~
jammygit
Its so rare that I didn't even realize you could put gifs in your readmes on
github. Slick

~~~
tomashubelbauer
You can even embed or link SVGs with CSS animations in them!

~~~
capableweb
What, that's not true, is it? I think GitHub turns those into images, if I'm
wrong. Could you link a example where someone embeds SVG with CSS animations?

~~~
nbe
GitHub sanitizes SVG animations by removing e.g. embedded JS code but SVG
animated with CSS is supported in Markdown files. See for example [1] which
contains [2].

[1]
[https://github.com/nbedos/termtosvg/blob/develop/README.md](https://github.com/nbedos/termtosvg/blob/develop/README.md)

[2]
[https://github.com/nbedos/termtosvg/blob/develop/docs/exampl...](https://github.com/nbedos/termtosvg/blob/develop/docs/examples/awesome_window_frame_powershell.svg)

~~~
tomashubelbauer
This is an excellent example.

------
stevekemp
I use gitbucket, for my own private repositories. Using this would be awesome
because the one thing I'm really missing is the ability to run CI-jobs in an
integrated fashion.

Installation of onedev, on a scratch host, was painless. But I think there are
a few things missing before I could use it for real. At the very least I have
to use username/password for repository access. I see nowhere in the user-
settings, or system-settings, for adding an SSH key.

That's a basic thing which is an immediate dealbreaker, although the other
things look amazing. (Role based access control, integrated CI, code-comments,
etc.)

~~~
takezoe
Actually, GitBucket has a plugin for CI [https://github.com/takezoe/gitbucket-
ci-plugin](https://github.com/takezoe/gitbucket-ci-plugin)

~~~
stevekemp
Thanks for the pointer, I had no idea!

Keep up your great work :)

------
robinshen
I do not have that plan yet, as product definition for cloud-based and on-
premises is very different. To my opinion it is hard to create easy-to-use
product for both use cases

~~~
hanniabu
I really like the "Saved Queries" list. Nice and easy to click.

~~~
robinshen
Thanks for trying out. For every saved queries, you may even subscribe it to
get notifications.

------
ablekh
Great work, congratulations! Will definitely give it a try. Having said that,
this project needs data import/export functionality (certainly for GitLab and
GitHub; perhaps, also for less popular options, e.g., Bitbucket, Gitea and
Gogs). Re: _" I take a lot of time optimizing the performance, and it can
easily handle large amount of issues, projects and large repositories at
company scale"_ \-- I'm not sure whether it makes sense to spend time on this,
unless you plan on adding enterprise features and building a business around
it (technical support, etc.).

~~~
vanviegen
Well, as the main competitor is notoriously slow but otherwise pretty great,
I'd say some focus on performance makes sense!

~~~
ablekh
I agree - _some_ focus definitely makes sense, but I was talking about the
author mentioning spending _" a lot of time"_ on this.

------
GordonS
Wow, this is seriously impressive, and rammed with features!

Do you have any plans to monetise, perhaps by providing a hosted version?
(altho I guess that would be hard, given the free build time offered by the
incumbents)

------
sandGorgon
Another JVM based similar project is
[https://gitbucket.github.io/](https://gitbucket.github.io/) (Scala).

It would be interesting to see this project auto-converted to kotlin and
reduction in code size (Intellij can do this automatically)

~~~
robinshen
Wow! That is interesting, :D Will try to see what happens.

~~~
sandGorgon
FYI - your code does not build for me because of dependency resolution issues.

Not sure why.

I'm using latest Idea.

~~~
robinshen
Please run below from command line first to see if it works:

mvn clean package

~~~
sandGorgon
yes. it does. basically the standard ide was croaking on your use of a private
artifactory.

Any particular reason why you have structured this way ? could you not pull
all your source code in a single build process ?

gradle will make the builds very effective - extremely performant on modular
builds

~~~
robinshen
I put some common libraries into a private artifactory as I want to reduce the
whole build time. The reason I am using Maven build instead of Gradle is that
I can use M2E in Eclipse which can compile the project incrementally very fast
while I am editing files.

~~~
sandGorgon
It's not advisable to split code like this. The better way is to use gradle
and make it a multi-module build. First time will take time , but each time it
will only compile incrementally. Blazing fast and good management.

All of android now uses this, so this is not new

~~~
robinshen
My main concern is that gradle might not work as well as M2E in Eclipse which
makes incremental compiling blazing fast (less than 1 sec for editing and
compiling)

~~~
eitland
Thanks! As long as maven works for you, just stick to it.

I'm also happy that it is plain Java as it means I can contribute without
learning IntelliJ or anything special.

~~~
robinshen
Thanks for willing to contribute. I will write some guideline for that later.
Also it is possible to develop in IntelliJ, just that you need to run "mvn
compile" from command line every time you changes the dependencies. While in
Eclipse, it is fully automated with help of M2E.

~~~
eitland
No worries. For some reason I personally prefer NetBeans and Eclipse to
IntelliJ, that's why I appreciate that you stick with plain Java and Maven
instead of Kotlin and Gradle :-)

------
steveluo9
It looks very nice. The UI is very intuitive. It's very intelligent to search
commits or symbols with the help of dropdown wizard everywhere, cool!

I'm very interested in the built-in CI system, especially you mentioned that
no yaml files to write. Actually, it's very painful for me to write yaml files
for GitLab. Just want to know is there any plan to build a cloud based service
like GitHub or GitLab? We just don't want to manage the instance ourselves.

------
mixmastamyk
Would be nice to have a strong competitor not written in Ruby.

~~~
sosodev
What difference does the implementation language make?

~~~
mixmastamyk
Makes a big difference in ability to contribute, extend, hire, not to mention
the performance angle.

------
choeger
Thanks for open sourcing your work.

Question: is it possible to describe the build environment _inside_ a project
with your approach? Bonus question: Is it possible to _generate_ the build
environment within a project? Because this is a totally missing feature for
me, to the point I might add it one day to gitlab or Jenkins. As a developer,
you should not be forced to repeat yourself in any way. And you should be able
to replicate your build everywhere, including your local machine. Hence I
consider it important to put the dockerfiles, etc. Inside the repo. I would be
fine with having a script that generates the Jenkins pipeline, gitlab ci, or
whatever on demand, but I do not want to keep the same information in sync
everywhere.

~~~
toupeira
GitLab engineer here, I'm curious what you're thinking of exactly. Right now
you could commit your Dockerfile, use it in CI to generate an image, and push
it to the registry where you can pull it from. Do you mean some convenience
features to automate these steps without requiring an explicit CI setup?

~~~
choeger
How and when would that push/pull work?

Here is the typical use case. Dev A wants to upgrade a dependency, say the
boost library for a C++ project. This requires some adaption. So they create a
changeset/pull request. Inside that pull request they adapt the Dockerfile to
use the latest boost library version.

The same day, developer B finishes a story and uses some legacy boost
features. They also submit a pull request. That change does not build with the
newer library but works fine with the older one.

The CI system now should be able to run the tests with both changesets
independently, using the Dockerfile from each branch.

When B's work is merged first, A needs to rebase and vice-versa.

Right now we implement this by running CI outside docker and creating and
entering a container with a script provided by the project, but that is a
home-grown solution. I would love to see gitlab allow each branch to create
its container automatically, when needed.

~~~
e12e
I'm not sure I follow, typical gitlab ci runs in the branch? So there's eg a
.gitlab-ci.yml and a ./Dockerfile in branch "new-feature", and one in "old-
story".

They would both run OK in your scenario. If "new-feature" is merged first,
"old-branch" would have to merge with (new) master and fix ci before being
able to pass ci and be allowedtto merge?

~~~
choeger
Usually you annotate the CI file with a container ID, not a Dockerfile, AFAIK.

~~~
piaste
You can use the Gitlab CI variables so that both the "docker build" job and
the "test docker image" job use a unique image ID for your pull request.

Personally I use branch + git tag name as the image tag, but you can use a
commit hash or whatever.

------
zmmmmm
Congrats on what looks like an amazing amount of work and a great project - I
am always in awe of people who do this kind of thing!

------
pheouk
This looks really great, what do you use to generate all the feature gifs on
the front page? I love when I see features visualized out like this, so easy
to comprehend

~~~
jjeaff
Licecap and ShareX are both free (windows) options to make screencap gifs.

~~~
whoisthemachine
ScreenToGif is my personal favorite on Windows.

[https://www.screentogif.com/](https://www.screentogif.com/)

------
dejj
I am very excited about OneDev; thank you for making it.

I browsed the documentation on Builds an found this:

> echo "##onedev[SetBuildVersion '@params:buildVersion@']"

this resembles Azure's way of setting build variables. I admit I think it is
crappy for Microsoft as a producer of operating systems to handle it this way,
instead of e.g. creating a special device.

What were your considerations for using the same style in OneDev?

~~~
drakmail
Build variables in TeamCity is handled by the same way

------
Aeolun
Now it just needs a built in docker repository and it covers everything I use
Gitlab for.

~~~
robinshen
It is on my radar. With a built-in binary repository, I can analyze
dependencies more easily to test downstream projects using artifacts of a
certain project

~~~
lloeki
Please take into consideration that there is a need for nested docker repos
(one additional level is enough like GitLab has per project). The overall
ECR/Azure/GitHub registry stuff is so crazily limited it’s borderline
unusable: you have to pop up projects/registries just to have a different
image name, and tags are limited to 128 chars, within [A-Za-z0-9-_] (so, no
slash), so you need to spawn repos like crazy (which means different creds or
setup or project settings) and/or suffer unreadable mangled tag names.

~~~
robinshen
Filed an issue covering your concern:
[https://github.com/theonedev/onedev/issues/24](https://github.com/theonedev/onedev/issues/24)

Please comment if you have any other requirements.

------
est
Anyone remember [https://code.rhodecode.com/](https://code.rhodecode.com/) ?

I used it in hg times.

~~~
NetOpWibby
I'm actually using it now! However, I'm now working on my own git viewer. RC
is nice but the way it renders Markdown is hideous.

Going from Gitlab > Gitea > trying and failing to get cgit and auth working >
RhodeCode made me realize I'm always going to have issues with how the SCM
looks. So, why not make my own?

~~~
marcinkuzminski
Can you give an example of that markdown rendering?

I think it's almost in pair on how Github renders markdown.

~~~
NetOpWibby
Almost?! Most definitely not. Unless of course, I'm using an old version.
Here's an example:
[https://code.webb.page/ChronVer/chronver](https://code.webb.page/ChronVer/chronver)

EDIT: I will say that RC is my favorite of the git viewers I've used thus far.
I'd love a way to completely style the UI with CSS.

~~~
marcinkuzminski
We'll work on improving this! Thanks for the feedback, this needs more of our
attention then :)

------
makkesk8
This looks amazing!

I will definitely use this! Is there any plan on kanban boards and/or an
container/npm/nuget registry?

Keep up the good work!

~~~
robinshen
A container registry feature request is in place. Please submit feature
request for npm/nuget registry. As to kanban boards, I am not very familiar
with it yet. Can you please try OneDev board and let me know what points you
feel missing compared to Kanban? You may also file feature request so that
discussion can happen there easier.

~~~
makkesk8
The OneDev board is great, definitely replaces trello. However, I was thinking
something more in line with azure devops. I would love to be able to create
sprints epics and what not. Or maybe is that out of scope for this project?

~~~
robinshen
Will milestone work for your case? You may create milestones directly from
board, and switch board view to specific milestone

------
rmdashrfstar
Is there a Helm chart available for quick K8s installation?

~~~
robinshen
Not yet. Filed an issue:
[https://github.com/theonedev/onedev/issues/30](https://github.com/theonedev/onedev/issues/30)

------
iddan
It looks awesome feature wise. UI can be improved

~~~
robinshen
Any suggestions will be very welcomed.

