如何触发 GitLab 项目的新构建

How to trigger a new build of a GitLab project

我正在尝试按照教程 https://about.gitlab.com/2016/03/01/gitlab-runner-with-docker/ 进行操作,我已经到了

的部分
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

CI/CD Pipelines 部分的 Settings 项目(我创建为 New Project 指定要从中克隆的 https://gitlab.com/gitlab-examples/nodejs/ URL),我看到以下内容:

然后在教程中说明,没有进一步解释,

Finally, we are ready to trigger a new build. We should see the next build running with our specific runner on our private server.

我应该如何 "trigger a new build"?是通过在我的本地版本的存储库中执行 git push 吗?

来自 GitLab CI documentation(强调我的):

If you add a .gitlab-ci.yml file to the root directory of your repository, and configure your GitLab project to use a Runner, then each merge request or push, triggers your CI pipeline.

所以是的,每次推送都会触发一个新的构建,但合并请求(通过网络界面处理)也会触发一个新的构建。

扩展@Fairy 的回答。 Gitlab 构建可以通过以下方式触发:

  • 一推
  • 调用 trigger
  • a webhook,由不同项目上发生的操作触发
  • 通过转到 Pipelines 选项卡并单击 Run pipeline
  • 手动