如何在 GitLab 中存储版本/二进制文件? [英] How to store releases/binaries in GitLab?

查看:97
本文介绍了如何在 GitLab 中存储版本/二进制文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 GitlabJenkins 和 - 可能 - Nexus(我需要一个工件存储)构建工作流.我想让 GitLab 存储发布/二进制文件 - 是否有可能以一种方便的方式?

我不希望有另一个可以从中下载版本(和文档)的服务,而是以某种方式将其与存储库管理器集成,就像在例如处理版本一样GitHub.有什么线索吗?

解决方案

2020 年 10 月更新:

请参阅文档问题.


2015 年 11 月更新:GitLab 8.2 现在支持发布.

有了它的 API,你现在可以 创建和更新与标签关联的 relase.
目前,只能将发行说明(markdown 文本和附件)添加到 git 标签(又名发行版).

2019 年 5 月更新:GitLab 1.11 引入了一个有趣的来宾访问版本":

<块引用>

您项目的来宾用户现在可以查看您在发布"页面上发布的发布.
他们将能够下载您发布的工件,但不能下载源代码,也不能查看代码库信息,例如标签和提交.


2015 年 3 月的原始答案

这是在进行中,并在 建议 4156755:

<块引用>

我们正在接受 Ciro 对最小提案的合并请求:

<块引用>

  1. 对于 https://github.com/cirosantilli/test/releases 下的每个仓库标签/tag/3.0,允许上传和下载文件列表.2. 上传和下载可以直接从标签列表视图中完成.3. 如果标签被移除,上传将被销毁.(我们不接受最近评论中提到的标签消息编辑)


对该建议的评论包括:

<块引用>

更有趣的是下一步.
我真的很想要一种让公众从发布"中下载工件的方法.无法访问源代码(即仅将源代码对项目团队保密,除了 wiki、发布"、问题跟踪器等其他任何内容).

<块引用>

然而,这样的附加功能看起来更通用,我为此提交了单独的功能请求.

<块引用>

尽管如此,我在这里重申我的观点:
而发布"的简单版本仍然很高兴,许多人可以轻松设置外部文件服务器并将发布/标签描述中的 URL 指向 GitLab 之外的此服务器.
换句话说,发布"是指发布".如果没有一些未来的整合图景,现在看起来可能不会有吸引力.

I am building a workflow with Gitlab, Jenkins and - probably - Nexus (I need an artifact storage). I would like to have GitLab to store releases/binaries - is it possible in a convenient way?

I would not like to have another service from which a release (and documentation) could be downloaded but to have it somehow integrated with repository manager, just like releases are handled in e.g. GitHub. Any clues?

解决方案

Update Oct. 2020:

GitLab 13.5 now offers:

Attach binary assets to Releases

If you aren’t currently using GitLab for your releases because you can’t attach binaries to releases, your workflow just got a lot simpler.

You now have the ability to attach binaries to a release tag from the gitlab.ci-yml. This extends support of Release Assets to include binaries, rather than just asset links or source code. This makes it even easier for your development teams to adopt GitLab and use it to automate your release process.

See Documentation and Issue.


Update Nov. 2015: GitLab 8.2 now supports releases.

With its API, you now can create and update a relase associated to a tag.
For now, it is only the ability to add release notes (markdown text and attachments) to git tags (aka Releases).

Update May 2019: GitLab 1.11 introduces an interesting "Guest access to Releases":

It is now possible for guest users of your projects to view releases that you have published on the Releases page.
They will be able to download your published artifacts, but are not allowed to download the source code nor see repository information such as tags and commits.


Original answer March 2015

This is in progress, and suggested in suggestions 4156755:

We’re accepting merge requests for the minimal proposal by Ciro:

  1. For each repository tag under https://github.com/cirosantilli/test/releases/tag/3.0, allow to upload and download a list of files. 2. The upload and download can be done directly from the tag list view. 3. If a tag gets removed, the uploads are destroyed. (we’re not accepting the tag message edit mentioned in recent comments)


The comments to that suggestion include:

What makes it more interesting is the next step.
I would really like a way to let public download artifacts from "releases" without being able to access source code (i.e. make sources private for project team only except anything else like wiki, "releases", issue tracker).

However, such additional feature looks more generic and I submitted a separate feature request for that.

Nevertheless, I repeat my point here:
While the simplistic version of "releases" is still nice to have, many people can easily set up external file server and point URLs in release/tag description to this server outside GitLab.
In other words, "releases" may not look attractive now without some future picture of integration.

这篇关于如何在 GitLab 中存储版本/二进制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆