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?