Gitlab CI/CD
将 Jenkins 的构建状态返回到 Gitlab,它将在提交或合并请求 UI 中显示
要安装 GitLab Runner:
- 添加官方 GitLab 存储库:
Debian/Ubuntu/Mint 安装:
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash
- 安装最新版本的 GitLab Runner
sudo apt-get install gitlab-runner
- 注册跑步者
sudo gitlab-runner register --url <gitlab_url> --registration-token <gitlab_runner_registration_token>
Runtime platform arch=amd64 os=linux pid=61343 revision=32fc1585 version=15.2.1
Running in system-mode.
Enter the GitLab instance URL (for example, https://gitlab.com/):
[http://192.168.4.142/]: http://192.168.4.142
Enter the registration token:
[GR1348941yWDvfgzxntfjZ2cKXAqE]: GR1348941yWDvfgzxntfjZ2cKXAqE
Enter a description for the runner:
[dev_03]: dev_03
Enter tags for the runner (comma-separated):
Enter optional maintenance note for the runner:
Registering runner... succeeded runner=GR1348941yWDvfgzx
Enter an executor: custom, docker, kubernetes, docker-ssh, parallels, shell, ssh, virtualbox, docker+machine, docker-ssh+machine:
shell
Runner registered successfully. Feel free to start it, but if it\'s running already the config should be automatically reloaded!
Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml"
updateGitlabCommitStatus
status:
管道状态,其中之一:created
, waiting_for_resource
, preparing
, pending
, running
, success
, failed
, canceled
, skipped
, manual
,scheduled