singularityhub / singularityhub.github.io

Container tools for scientific computing! Docs at https://singularityhub.github.io/singularityhub-docs
https://singularityhub.github.io
68 stars 9 forks source link

[ENH] add GitLab integration #78

Closed bneron closed 5 years ago

bneron commented 7 years ago

Link to Container Collection Log, Build, or Collection (in that order)

I have a project hosted on a private gitlab. the repository is publicly available https://gitlab.pasteur.fr/bneron/craw/tree/branch_1.0 I provide a Singularity recipe (https://gitlab.pasteur.fr/bneron/craw/blob/branch_1.0/Singularity) I'd like to connect Singularityhub and my project to build a new image each time I create a new tag

Behavior when Building Locally

Write here.

Error on Singularity Hub

Write here.

What do you think is going on?

Write here.

vsoch commented 7 years ago

hey @bneron ! I hadn't added GitLab in the past because their API didn't provide token secrets. It looks like they might now:

https://docs.gitlab.com/ce/user/project/integrations/webhooks.html

I need to do some thinking about this, because it's likely the case that all Gitlab installations aren't the same. For example, I wouldn't want to encourage not using https, and it would not work for older Gitlab versions that don't get have the token for webhooks.

So this can likely come with a future release, but I don't have the bandwidth to work on it at the moment,. In the meantime, you might give Github a try?

Thanks for the request! Definitely will get this into a future version.

yoann-dufresne commented 6 years ago

Is there any news about the linking with a private gitlab ?

vsoch commented 6 years ago

There isn't any kind of timeline set up - I maintain this on my own and I don't see a huge compelling need since Github does the same, and Gitlab has an internet container registry. I think what would go farther is to contribute to the open source singularity registry --> https://www.github.com/singularityhub/sregistry which already has GitLab and just needs the builder plugins to trigger in some environment.

What I am aiming to do (no timeline, because I'm pretty busy!) is do this, and then have the deployed Singularity Hub tentatively be community maintained (and so you can add features like this via PR, etc.)

titansmc commented 6 years ago

Hi, so I can connect a private gitlab.domain.com repository to the singularity hub? That would work for me. Or Should I deploy a local singularity hub instance and then I would be able to link it to my private Gitlab instance? Thanks.

vsoch commented 6 years ago

Heyo! No plans still to add GitLab to Singularity Hub proper, and the avenue would be to use Singularity Registry Server and then have GitLab as an authentication backend and push to your hearts content.

titansmc commented 6 years ago

I see Vanessa.... That would be cool. When I look for gitlab in the singularity hub registry I see that there are several occurrences in the code. Does it mean that you are working on it? or it is something else? Cheers.

vsoch commented 6 years ago

The Gitlab in the code is an authentication mechanism so the user can log in via GitLab. Singularity Registry Server is different than Singularity Hub in that you can push directly, so right now the avenue to build with GitLab would be to still maintain your CI and tests there, and push on success. This is a good strategy to take because CI services and build environments will always change, but we can have some confidence that a push command with an euthenticated token is going to work across platforms and time.

I develop based on user direct need - so if you were to deploy a registry, try out building and push, and then file an issue that you want some further integration, I would then work on it for you. Thus far, this need has not been expressed (only desire for GitLab integration with Singularity Hub, which needs to remain minimal).

vsoch commented 5 years ago

hey everyone! I won't be adding GitLab here, but if you are interested in a connection via Singularity Registry Server, please open an issue there. Thanks!