如何仅使用 GitLab CI?

Gan*_*der 3 gitlab gitlab-ci

我在 BitBucket 中有存储库,我很满意,不想将其更改为另一个 cvs。

但我想为我的项目使用一些免费的 CI 服务。

我尝试过的事情:

  • PhpCI,但 PhpCI 不支持
  • 詹金斯,但对我来说太复杂了

这就是我开始研究 Gitlab CI 的原因。

我看到 CI 是 gitlab ( https://about.gitlab.com/gitlab-ci/ )的一部分。但也许不知何故我可以只使用 CI 而不要使用其他功能。

是否可以?

tec*_*raf 5

如果没有 GitLab,您将无法使用 GitLab CI,但如果您不想,没有人会强迫您使用任何其他 GitLab 功能。

Git 是分布式的,您可以将源推送到多个目的地。

只需在您的项目.git/config中将其定义为另一个推送目的地,例如:

[remote "origin"]
    url = git@bitbucket.org:user/project.git
    pushurl = git@bitbucket.org:user/project.git
    pushurl = ssh://git@gitlab.yourdomain/user/project.git
    fetch = +refs/heads/*:refs/remotes/origin/*
Run Code Online (Sandbox Code Playgroud)

然后 add .gitlab-ci.yml、 push 和 GitLab CI 将运行,而您的源将同时位于 BitBucket 和 GitLab(您将仅用于检查 CI 管道)。