Gitlab CI-如何启动共享运行器 [英] Gitlab CI - How to start Shared Runner

查看:150
本文介绍了Gitlab CI-如何启动共享运行器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Gitlab CI的新手.

I'm new to Gitlab CI.

我已经配置了.gitlab-ci.yml文件,并使用CI Lint通过了验证过程.

I have configured .gitlab-ci.yml file, and using CI Lint it has passed the validation process.

基于此文档,我可以看到应该在其中配置特定的运行器虚拟机,VPS,裸机,泊坞窗容器或 甚至是一堆容器.

Based on this documentation, I can see a specific runner should be configured on a virtual machine, a VPS, a bare-metal machine, a docker container or even a cluster of containers.

但是我可以看到gitlab有自己的共享运行器,并且默认情况下已启用.

But I can see gitlab has its own shared runners and enabled by default.

问题是如何使用此共享运行器?

The question is how to use this shared runner?

当我访问管道"页面时,我只能看到蓝色的"管道入门" 按钮,单击该按钮后,我将被重定向到

When I visit the Pipeline page I can only see the blue Get Started with Pipeline button and when clicked I was redirected to this page.

这是我的.gitlab-ci.yml内容:

Here's my .gitlab-ci.yml content :

before_script:
  - eval $(ssh-agent -s)

stage_deploy:
  only:
    - testing
  script:
    - ssh-add <(echo "$STAGING_PRIVATE_KEY")
    - ssh root@1.2.3.4 "sh update_app.sh"

推荐答案

它只会为您的testing分支运行该作业,您是否也已将.gitlab-ci.yml文件添加到该分支?

It will only run the job for your testing branch, have you added the .gitlab-ci.yml file to that branch too?

这篇关于Gitlab CI-如何启动共享运行器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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