Install Gitlab-Runner

Install Gitlab Runner on Mac OS

Step1: Install

brew install gitlab-runner
gitlab-runner --version

reference:
https://docs.gitlab.com/runner/
https://docs.gitlab.com/runner/install/index.html
install on Machttps://docs.gitlab.com/runner/install/osx.html


Step2: Register

gitlab-runner register
foxit@bogon yuping % gitlab-runner register
Runtime platform                                    arch=amd64 os=darwin pid=48821 revision=c6e7e194 version=14.8.2
WARNING: Running in user-mode.                     
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
WARNING: [[ssh.disable_strict_host_key_checking]] is not set. Starting from 15.0, strict host checking will be enabled unless explicitly disabled. 
WARNING: SSH strict host checking is disabled. Consider setting [[ssh.disable_strict_host_key_checking]] to false (https://docs.gitlab.com/runner/executors/ssh.html#security). 
Enter the GitLab instance URL (for example, https://gitlab.com/):
https://gitlab.com/
Enter the registration token:
GR1348xxxTCC4Jc4
Enter a description for the runner:
[bogon]: learning for gitlab
Enter tags for the runner (comma-separated):
ssh,ci,mac_os 
Enter optional maintenance note for the runner:
shell
Registering runner... succeeded                     runner=GR134894
Enter an executor: docker, docker-ssh, parallels, ssh, virtualbox, docker+machine, custom, shell, docker-ssh+machine, kubernetes:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 

registration token:
insert image description here
After registration, you can see that it is online and can be edited:
insert image description here
reference: https://docs.gitlab.com/runner/register/index.html#macos


Step3: open

gitlab-runner start
gitlab-runner stop
gitlab-runner status
brew services start gitlab-runner
brew services stop gitlab-runner

Install Gitlab Runner on Windows

Step1: Install

Create a folder:C:\Gitlab-Runner

Download the package 64-bit or 32-bit and put it in the created folder.

Rename the file gitlab-runner.exe(not necessary)

Run cmd as Administrator:

C:\Windows\system32>cd C:\Gitlab-Runner
C:\Gitlab-Runner>
C:\Gitlab-Runner>gitlab-runner.exe install
Runtime platform                                    arch=amd64 os=windows pid=19460 revision=febb2a09 version=15.0.0

C:\Gitlab-Runner>gitlab-runner --version
Version:      15.0.0
Git revision: febb2a09
Git branch:   15-0-stable
GO version:   go1.17.7
Built:        2022-05-19T19:34:09+0000
OS/Arch:      windows/amd64

C:\Gitlab-Runner>gitlab-runner.exe start
Runtime platform                                    arch=amd64 os=windows pid=21320 revision=febb2a09 version=15.0.0

C:\Gitlab-Runner>gitlab-runner.exe stop
Runtime platform                                    arch=amd64 os=windows pid=8588 revision=febb2a09 version=15.0.0

C:\Gitlab-Runner>gitlab-runner.exe status
Runtime platform                                    arch=amd64 os=windows pid=12324 revision=febb2a09 version=15.0.0
gitlab-runner: Service has stopped

reference:https://docs.gitlab.com/runner/install/windows.html


Step2: Register

C:\Gitlab-Runner>gitlab-runner.exe register
Runtime platform                                    arch=amd64 os=windows pid=16400 revision=febb2a09 version=15.0.0
Enter the GitLab instance URL (for example, https://gitlab.com/):
https://gitlab.com/
Enter the registration token:
GR13489xxxxxxxxxxxxxpTCC4Jc4
Enter a description for the runner:
[CN-NJ-yuping]: learning for gitlab on win
Enter tags for the runner (comma-separated):
ci,windows
Enter optional maintenance note for the runner:

Registering runner... succeeded                     runner=GR1348941stxanAtJ
Enter an executor: kubernetes, custom, docker, docker-ssh, virtualbox, docker-ssh+machine, docker-windows, parallels, shell, ssh, docker+machine:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

Step3: open

C:\Gitlab-Runner>gitlab-runner.exe start
Runtime platform                                    arch=amd64 os=windows pid=18928 revision=febb2a09 version=15.0.0

Check if the registration is successful:
insert image description here

Supongo que te gusta

Origin blog.csdn.net/qq_31362767/article/details/124992907
Recomendado
Clasificación